我试图在肥皂主体中命名空间。所以我尝试了以下内容,
代码已尝试
String nameSpace ="com";
String namespaceURI ="http://sample.service.com/SampleServiceV1.0";
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPBody soapBody = envelope.getBody();
SOAPElement soapBodyElem = soapBody.addChildElement(operationName, nameSpace);
soapBody.addNamespaceDeclaration(nameSpace, namespaceURI);
错误 com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:无法找到前缀com的名称空间
必填输出: