По url http://localhost:5555/api/containerize у меня есть такая схема:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="tns" xmlns:nam="https://iotchet.ru/namespases">
<soapenv:Header>
<tns:RequestHeader>
<!--Optional:-->
<tns:sessionkey>?</tns:sessionkey>
</tns:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<tns:SendContainer>
<!--Optional:-->
<tns:Container>
<nam:name>?</nam:name>
<nam:content>cid:1107829974960</nam:content>
</tns:Container>
</tns:SendContainer>
</soapenv:Body>
</soapenv:Envelope>
Я пытаюсь прочитать эту wsdl так:
public static void main(String... args) throws SOAPException {
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage soapMessage = messageFactory.createMessage();
SOAPPart soapPart = soapMessage.getSOAPPart();
String serverURI = "http://localhost:5555/api/containerize?wsdl";
// SOAP Envelope
SOAPEnvelope envelope = soapPart.getEnvelope();
envelope.addNamespaceDeclaration("example", serverURI);
// SOAP Body
SOAPBody soapBody = envelope.getBody();
System.out.println(soapBody.toString());
}
В итоге, объект soapBody у меня null. Не понимаю, что делаю не так...
Продвижение своими сайтами как стратегия роста и независимости