I am trying to make a successful call from my "Spring Boot Application" to a SOAP API on the "Azure API Manager".
I have defined a WSDL
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:tns="http://www.dataaccess.com/webservicesserver/"
name="PutMessage"
targetNamespace="http://www.dataaccess.com/webservicesserver/">
<types>
<xs:schema elementFormDefault="qualified" targetNamespace="http://www.dataaccess.com/webservicesserver/">
<xs:element name="PutMessage">
<xs:complexType>
<xs:sequence>
<xs:element name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PutMessageRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PutMessageResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="PutMessageResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
<message name="PutMessage">
<part name="parameters" element="tns:PutMessage"/>
</message>
<message name="PutMessageSoapRequest">
<part name="parameters" element="tns:PutMessageRequest"/>
</message>
<message name="PutMessageResponse">
<part name="parameters" element="tns:PutMessageResponse"/>
</message>
<portType name="PutMessageSoapType">
<operation name="PutMessage">
<documentation>Returns the feedback by AzureServicebus when a message is pasted into it.</documentation>
<input message="tns:PutMessageSoapRequest"/>
<output message="tns:PutMessageResponse"/>
</operation>
</portType>
<binding name="PutMessageSoapBinding" type="tns:PutMessageSoapType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="PutMessage">
<soap:operation soapAction="" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="PutMessageSoapBinding12" type="tns:PutMessageSoapType">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="PutMessage">
<soap12:operation soapAction="" style="document"/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
</binding>
<service name="PutMessage">
<documentation>The Web Service, to interact with azure service bus.</documentation>
<port name="PutMessageSoap" binding="tns:PutMessageSoapBinding">
<soap:address location="https://www.dataaccess.com/webservicesserver/numberconversion.wso"/>
</port>
<port name="PutMessageSoap12" binding="tns:PutMessageSoapBinding12">
<soap12:address location="https://www.dataaccess.com/webservicesserver/numberconversion.wso"/>
</port>
</service>
</definitions>
And uploaded the WSDL to the Azure API Manager.
Spring Boot SOAP CLient
Further
- I have generated WebServiceFactory inheriting from
jakarta.xml.ws.Service - and WebService "PutMessageSoapType" annotated with
@WebService
So that I am now set to call the SOAP API.
PutMessage_Service putMessageService = new PutMessage_Service();
PutMessageSoapType myWebService = putMessageService.getPutMessageSoap();
PutMessageRequest putMessageRequest = new PutMessageRequest();
putMessageRequest.setMessage("");
myWebService.putMessage(putMessageRequest);
Question:
what I fail to recognize is
how to point the Spring Boot SOAP Client
to the Base URL https://alfdevapi5-example-apim.azure-api.net/suffix1 of the Azure API Manager API?

