Results 1 to 4 of 4

Thread: web service document-literal

  1. #1

    Default web service document-literal

    hello,

    i have a web application with Spring that in the manager create a xml and sign with enveloped signature, and send it via https with java.net.URL.

    i have to expose as a web service, document-literal style, put the xml that cretate the manager ant put in the soap body directly.

    how can i do this??? i have find examples that use web service binding object to xml, but i think that i can't use it because i have the signed xml that i want to put in the soap body, not an object.

    thanks in advance,
    César.

  2. #2
    Join Date
    Jun 2005
    Location
    Athens, Greece
    Posts
    57

    Default

    Cesar,

    What is the form of the digital signature of the XML?
    If you use, for instance, XML-Signature then the signature is also XML, so you can define a XML Schema that containes both your original XML and the its signature and use it in your WSDL.

    Maybe you can also follow a different approach. Use WS-Security to sign at SOAP envelop level.

  3. #3

    Default

    hello routis,

    yes, i use XML-Signature (apache xmldsig) and the signature is also XML, like this:

    <message_signed xmlns="http://.../messages">
    <message Id="12345">
    ...
    </message>
    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    ...
    <ds:Reference URI="#12345">
    ...
    </ds:Signature>
    </message_signed>

    i could put the xsd that define this xml in the wsdl,
    i have this xml as a String, how put the xml in the soap body???

    i have seen spring-ws and axis2, but they use data binding with wsdl2java, and generate classes that mapping the xsd of wsdl... but i have the signed xml yet. how put in the soap body???

    yes, ws-security... i could have to change too things.

    thanks,
    César.

  4. #4
    Join Date
    Jun 2005
    Location
    Athens, Greece
    Posts
    57

    Default

    Quote Originally Posted by cesar
    i have this xml as a String, how put the xml in the soap body???
    Although I don't understand why you have the XML only as String, in this case you can define (in the WSDL) the <xsd:any> as payload or <xsd:string>
    You might find this link or better this useful.

    If you adopt the use of <xsd:string> for example, then spring-ws is straightforward
    Last edited by routis; May 12th, 2006 at 07:05 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •