-1

I am trying to write the following SOAP request in java, but seem to be struggling with how to write referencing the id type element in my request. Does anyone know how to write the following request in java using javax.xml.soap? I'm starting out with a very simple request. Any help would be very much appreciated. Thank you!

<soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/soap/envelope/";
    xmlns:bsvc="urn:com.library/bsvc">
<soapenv:Header/>
<soapenv:Body>
    <bsvc:Get_Book_Request>
        <bsvc:Request_References>
            <bsvc:Book_Reference>
                <bsvc:ID bsvc:type="BOOK_ID">25243</bsvc:ID>
            </bsvc:Book_Reference>
        </bsvc:Request_References>
    </bsvc:Get_Book_Request>
</soapenv:Body>
</soapenv:Envelope>
3
  • <soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/soap/envelope" xmlns:bsvc="urn:com.library/bsvc"> <soapenv:Header/> <soapenv:Body> <bsvc:Get_Book_Request> <bsvc:Request_References> <bsvc:Book_Reference> <bsvc:ID bsvc:type="BOOK_ID">25243</bsvc:ID> </bsvc:Book_Reference> </bsvc:Request_References> </bsvc:Get_Book_Request> </soapenv:Body> </soapenv:Envelope> Commented Sep 28, 2015 at 18:37
  • 1
    Delete your comment and move the soap request into the body of your question. Commented Sep 28, 2015 at 18:39
  • By far the easiest way to make a SOAP request is to generate classes from the WSDL using the wsimport tool that comes with every JDK. Commented Sep 28, 2015 at 18:57

1 Answer 1

0

I think this SO Q&A might already cover the general setup in building a SOAP message using Java's API:

Question, Answer

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.