Document Literal / Wrapped

Hi,
I am using Oracle BPEL 10.1.2.0.2, and it seems like WSDLs are generated in Document Literal form. I can't seem to find a way to specify Document Literal Wrapped, is this possilbe?
Thanks,
Nicholas

Actually, if we try to create webservice(wsdl) from XI (Integration Directory) by default it creates with document/literal style. My question is, Is there any way to create document/literal wrapped wsdl file(not only document/literal wrapped other styles also).
If we take ORACLE Apps, they have 4 options (document,rpc style and etc) while creating the wsdl file.
XI doesn't have this options, but can we do any workaround to do this?
Regards
Sara

Similar Messages

  • Does PI supports WSDL document literal wrapped?

    Hi experts,
    One question, please! Does PI supports WSDL document literal wrapped? If not which workaround we have?
    Thanks in advance,
    Jorge.

    Thanks but didn't help too much.
    In fact, the first thread was posted by myself and it's only document literal related. The second is regarding the WSDL formats supported and also with the element <wsdl:part name=" "> that is not supported.
    I know that PI supports WSDL document literal, but anyone has implemented document literal wrapped, to invoke different functions that use the same parameters.
    Regards,
    Jorge.

  • Cant parse Document/Literal WS Response

    It might be the case that i'm not doing correctly, but I cant seem to parse the document/literal response for the life of me. The response parses as expected when I build the web service as an RPC WSDL, but fails when I build as document/literal. The company standard is document/literal wrapped, so thats the one I need to use. Any help would be greatly appreciated!!
    Here is the WSDL contents and the javascript...
    WSDL:
    <wsdl:definitions targetNamespace="http://dao.test.crowley.com">
    <!--
    WSDL created by Apache Axis version: 1.4
    Built on Apr 22, 2006 (06:55:48 PDT)
    -->
    <wsdl:types>
    <schema elementFormDefault="qualified" targetNamespace="http://dao.test.crowley.com">
    <element name="getUserJSON">
    <complexType>
    <sequence>
    <element name="sql" type="xsd:string"/>
    </sequence>
    </complexType>
    </element>
    <element name="getUserJSONResponse">
    <complexType>
    <sequence>
    <element name="getUserJSONReturn" type="xsd:string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    </wsdl:types>
    <wsdl:message name="getUserJSONRequest">
    <wsdl:part element="impl:getUserJSON" name="parameters">
          </wsdl:part>
    </wsdl:message>
    <wsdl:message name="getUserJSONResponse">
    <wsdl:part element="impl:getUserJSONResponse" name="parameters">
          </wsdl:part>
    </wsdl:message>
    <wsdl:portType name="UserDAO">
    <wsdl:operation name="getUserJSON">
    <wsdl:input message="impl:getUserJSONRequest" name="getUserJSONRequest">
           </wsdl:input>
    <wsdl:output message="impl:getUserJSONResponse" name="getUserJSONResponse">
           </wsdl:output>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="UserDAOSoapBinding" type="impl:UserDAO">
    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getUserJSON">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="getUserJSONRequest">
    <wsdlsoap:body use="literal"/>
    </wsdl:input>
    <wsdl:output name="getUserJSONResponse">
    <wsdlsoap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="UserDAOService">
    <wsdl:port binding="impl:UserDAOSoapBinding" name="UserDAO">
    <wsdlsoap:address location="http://localhost:8080/PDFTest/services/UserDAO"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Javascript:
    function testDocumentLiteral(){
         try{
              var cURL = "http://localhost:8080/PDFTest/services/UserDAO?wsdl";
            console.println("\n\n***** ECHO *****");
            console.println("\nWSDL: " + cURL);
              //Set SQL String
            var sqlString = "SELECT * FROM USER WHERE EMPLOYEE_ID = 123456";
              console.println("SQL: " + sqlString);
              // Call the echoString SOAP method -- it is an RPC Encoded method
              SOAP.wireDump = false;
              var response = SOAP.request(
                   cURL: cURL,
                   oRequest: {
                        "http://localhost:8080/PDFTest/services/UserDAO?wsdl:getUserJSON": {
                             sql: sqlString
                   cAction: ""
              var parsedResult = response["http://localhost:8080/PDFTest/services/UserDAO?wsdl:getUserJSONResponse"]["getUserJSONReturn"];
              console.println("Web Service Response: " + parsedResult);
         catch(e){
              console.println("Exception...\n" + e);

    Here is my wireDump:
    <soapenv:Envelope>

    <soapenv:Body>

    <getUserJSONResponse>

    <ns1:getUserJSONReturn>
    [{"firstName":"John","middleName":"X.","lastName":"Doe","employeeId":123456}]
    </ns1:getUserJSONReturn>
    </getUserJSONResponse>
    </soapenv:Body>
    </soapenv:Envelope>

  • Encryption of body's first child (method name) in Doc Literal Wrapped

    G'day all,
    I created a sample, where the service requires an encrypted input element (body's first child), which is the method name in document literal wrapped web services.
    I added few more operation to the SEI to make it more interesting scenario. It worked rightly.
    I am curious to know how WebService engine picks the security policy rightly? Since the on the wire shows EncryptedData element instead of input message name.
    Also, I added @Policy annotation description on the Impl Class level. Is it going to work or fail if I add different @Policy annotations to each WebMethod level and have encryption of the input element?
    With Regards,
    Mayank

    Hi
    The following link has information on using the Policy annotations
    http://edocs.bea.com/wls/docs100/webserv_sec/message.html#wp210258
    Ajay

  • Document/literal messaging with OAS 9.0.4

    please let me know if i have this right...
    my understanding is that if i want to do document/literal soap messaging to a wrapped pl/sql function with OAS 9.0.4 then i have to go rpc/endcoded and use a string for my xml document payload?
    any input would be most appreciated.
    thanks in advance.
    Message was edited by:
    user521233

    If you are new to Web Services, you should really consider using the latest version of the OAS stack. With 9.0.4, you should only work with RPC/Encoded and the basic data type supported out of the box.
    Using 10.1.3.2 (or any 10.1.3) is really where you want to start.
    This is just my personnal opinion, and I do understand that it's not always possible to move to the latest release. However, pushing back may be your best option.
    Best,
    -Eric

  • Document/literal  WS w/ multipart attachment on OC4J 10.1.3/10.1.2

    Hi all,
    I am wondering if OC4J 10.1.3 or 10.1.2 can handle document/literal Web Service with multipart attachment using JAX-RPC API.
    I have created a prototype which does doc/lit WS with text/plain attachment without any problems on OC4J 10.1.3 DP 4.
    But, no luck with multipart/related attachment. Our messaging system is designed that the first part is the SOAP envelope.
    The second part is a multipart message, which could be nested.
    Page 19-9 of Oracle Application Server Web Services Developer's Guide 10g Release 3 (10.1.3) B14434-01 (Sep. 2005)
    does not have the multipart/* support for SWA attachment. It covers image/jpeg, image/gif, image/tif, text/plain, application/plain and text/xml.
    Does anyone know if multipart is supported? Can you provide a working example please?
    many thanks in advance !
    ---------WSDL ----------
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions      xmlns="http://schemas.xmlsoap.org/wsdl/"           
              xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd"
              xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
              xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
              xmlns:tns="http://service.topdown/"
              name="bank"
              targetNamespace="http://service.topdown/">
         <types>
              <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
                   elementFormDefault="qualified"
                   targetNamespace="http://service.topdown/">
                   <xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd"
                        schemaLocation="http://mypc.company.com/xml/ws-i-basic-profile-1.1.xsd" /> <!-- TEMPORARY LOCATION TO AVOID PROXY SETUP -->
                   <complexType name="createAccount">
                        <sequence>
                             <element name="acctName" nillable="true" type="string"/>
                             <element name="initBalance" type="float"/>
                        </sequence>
                   </complexType>
                   <complexType name="createAccountResponse">
                        <sequence>
                             <element name="result" nillable="true" type="string"/>
                        </sequence>
                   </complexType>
                   <complexType name="AccountException">
                        <sequence>
                             <element name="message" nillable="true" type="string"/>
                        </sequence>
                   </complexType>
                   <complexType name="deposit">
                        <sequence>
                             <element name="acctID" nillable="true" type="string"/>
                             <element name="amount" type="float"/>
                        </sequence>
                   </complexType>
                   <complexType name="depositResponse">
                        <sequence/>
                   </complexType>
                   <complexType name="getAccountID">
                        <sequence>
                             <element name="acctName" nillable="true" type="string"/>
                        </sequence>
                   </complexType>
                   <complexType name="getAccountIDResponse">
                        <sequence>
                             <element name="result" nillable="true" type="string"/>
                        </sequence>
                   </complexType>
                   <complexType name="getBalance">
                        <sequence>
                             <element name="acctID" nillable="true" type="string"/>
                             <element name="acctName" nillable="true" type="string"/>
                        </sequence>
                   </complexType>
                   <complexType name="getBalanceResponse">
                        <sequence>
                             <element name="result" type="float"/>
                        </sequence>
                   </complexType>
                   <complexType name="withdraw">
                        <sequence>
                             <element name="acctID" nillable="true" type="string"/>
                             <element name="amount" type="float"/>
                        </sequence>
                   </complexType>
                   <complexType name="withdrawResponse">
                        <sequence/>
                   </complexType>
         <!-- Added from attachment xsd -->               
                   <complexType name="ClaimDetailType">
                        <xsd:sequence>
                             <element name="Name" type="xsd:string"/>
                             <element name="ClaimForm" type="ref:swaRef"/>
                        </xsd:sequence>
                   </complexType>
                   <element name="claimDetailElement" type="tns:ClaimDetailType"/>
                   <element name="claimResponseElement" type="ref:swaRef"/>
         <!-- End of from attachment xsd -->               
                   <element name="createAccountElement" type="tns:createAccount"/>
                   <element name="createAccountResponseElement" type="tns:createAccountResponse"/>
                   <element name="AccountExceptionElement" type="tns:AccountException"/>
                   <element name="depositElement" type="tns:deposit"/>
                   <element name="depositResponseElement" type="tns:depositResponse"/>
                   <element name="getAccountIDElement" type="tns:getAccountID"/>
                   <element name="getAccountIDResponseElement" type="tns:getAccountIDResponse"/>
                   <element name="getBalanceElement" type="tns:getBalance"/>
                   <element name="getBalanceResponseElement" type="tns:getBalanceResponse"/>
                   <element name="withdrawElement" type="tns:withdraw"/>
                   <element name="withdrawResponseElement" type="tns:withdrawResponse"/>
              </schema>
         </types>
         <message name="BankService_depositResponse">
              <part name="parameters" element="tns:depositResponseElement"/>
         </message>
         <message name="BankService_deposit">
              <part name="parameters" element="tns:depositElement"/>
         </message>
         <message name="AccountException">
              <part name="AccountExceptionElement" element="tns:AccountExceptionElement"/>
         </message>
         <message name="BankService_createAccount">
              <part name="parameters" element="tns:createAccountElement"/>
         </message>
         <message name="BankService_withdrawResponse">
              <part name="parameters" element="tns:withdrawResponseElement"/>
         </message>
         <message name="BankService_createAccountResponse">
              <part name="parameters" element="tns:createAccountResponseElement"/>
         </message>
         <message name="BankService_getBalance">
              <part name="parameters" element="tns:getBalanceElement"/>
         </message>
         <message name="BankService_getAccountIDResponse">
              <part name="parameters" element="tns:getAccountIDResponseElement"/>
         </message>
         <message name="BankService_withdraw">
              <part name="parameters" element="tns:withdrawElement"/>
         </message>
         <message name="BankService_getAccountID">
              <part name="parameters" element="tns:getAccountIDElement"/>
         </message>
         <message name="BankService_getBalanceResponse">
              <part name="parameters" element="tns:getBalanceResponseElement"/>
         </message>
         <!-- Added from attachment xsd -->               
         <message name="ClaimIn">
              <part name="ClaimDetail" element="tns:claimDetailElement"/>
         </message>
         <message name="ClaimOut">
              <part name="ClaimRefNo" element="tns:claimResponseElement"/>
         </message>
         <!-- Added from attachment xsd -->               
         <portType name="BankService">
              <documentation>A service that provides banking operations for client applications.</documentation>
              <operation name="SendClaim">
                   <input message="tns:ClaimIn"/>
                   <output message="tns:ClaimOut"/>
              </operation>
              <operation name="createAccount">
                   <documentation>Creates a banking account.</documentation>
                   <input message="tns:BankService_createAccount"/>
                   <output message="tns:BankService_createAccountResponse"/>
                   <fault name="AccountException" message="tns:AccountException"/>
              </operation>
              <operation name="deposit">
                   <documentation>Performs a bank deposit.</documentation>
                   <input message="tns:BankService_deposit"/>
                   <output message="tns:BankService_depositResponse"/>
                   <fault name="AccountException" message="tns:AccountException"/>
              </operation>
              <operation name="getAccountID">
                   <documentation>Retrieves an account ID.</documentation>
                   <input message="tns:BankService_getAccountID"/>
                   <output message="tns:BankService_getAccountIDResponse"/>
                   <fault name="AccountException" message="tns:AccountException"/>
              </operation>
              <operation name="getBalance">
                   <documentation>Retrieves an account balance.</documentation>
                   <input message="tns:BankService_getBalance"/>
                   <output message="tns:BankService_getBalanceResponse"/>
                   <fault name="AccountException" message="tns:AccountException"/>
              </operation>
              <operation name="withdraw">
                   <documentation>Withdraws funds from a bank account.</documentation>
                   <input message="tns:BankService_withdraw"/>
                   <output message="tns:BankService_withdrawResponse"/>
                   <fault name="AccountException" message="tns:AccountException"/>
              </operation>
         </portType>
         <binding name="BankServicePortBinding" type="tns:BankService">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="SendClaim">
                   <soap:operation soapAction="http://example.com/soapaction"/>
                   <input>
                        <mime:multipartRelated>
                             <mime:part>
                                  <soap:body use="literal" parts="ClaimDetail" namespace="http://example.com/mimetypes"/>
                             </mime:part>
                        </mime:multipartRelated>
                   </input>
                   <output>
                        <mime:multipartRelated>
                             <mime:part>
                                  <soap:body use="literal" namespace="http://example.com/mimetypes"/>
                             </mime:part>
                        </mime:multipartRelated>
                   </output>
              </operation>
              <operation name="createAccount">
                   <soap:operation soapAction="http://service.topdown/:createAccount"/>
                   <input>
                        <soap:body use="literal" parts="parameters"/>
                   </input>
                   <output>
                        <soap:body use="literal" parts="parameters"/>
                   </output>
                   <fault name="AccountException">
                        <soap:fault name="AccountException" use="literal" encodingStyle=""/>
                   </fault>
              </operation>
              <operation name="deposit">
                   <soap:operation soapAction="http://service.topdown/:deposit"/>
                   <input>
                        <soap:body use="literal" parts="parameters"/>
                   </input>
                   <output>
                        <soap:body use="literal" parts="parameters"/>
                   </output>
                   <fault name="AccountException">
                        <soap:fault name="AccountException" use="literal" encodingStyle=""/>
                   </fault>
              </operation>
              <operation name="getAccountID">
                   <soap:operation soapAction="http://service.topdown/:getAccountID"/>
                   <input>
                        <soap:body use="literal" parts="parameters"/>
                   </input>
                   <output>
                        <soap:body use="literal" parts="parameters"/>
                   </output>
                   <fault name="AccountException">
                        <soap:fault name="AccountException" use="literal" encodingStyle=""/>
                   </fault>
              </operation>
              <operation name="getBalance">
                   <soap:operation soapAction="http://service.topdown/:getBalance"/>
                   <input>
                        <soap:body use="literal" parts="parameters"/>
                   </input>
                   <output>
                        <soap:body use="literal" parts="parameters"/>
                   </output>
                   <fault name="AccountException">
                        <soap:fault name="AccountException" use="literal" encodingStyle=""/>
                   </fault>
              </operation>
              <operation name="withdraw">
                   <soap:operation soapAction="http://service.topdown/:withdraw"/>
                   <input>
                        <soap:body use="literal" parts="parameters"/>
                   </input>
                   <output>
                        <soap:body use="literal" parts="parameters"/>
                   </output>
                   <fault name="AccountException">
                        <soap:fault name="AccountException" use="literal" encodingStyle=""/>
                   </fault>
              </operation>
         </binding>
         <service name="bank">
              <port name="BankServicePort" binding="tns:BankServicePortBinding">
                   <soap:address location="http://localhost:8888/bank/bank"/>
              </port>
         </service>
    </definitions>

    Thank you, Tim for your reply.
    I found the answer myself. :-)
    It's not the WSDL, it's the test program.
    You are suggesting SWA attachment, which works. But, I am looking for SWAref attachment, which could be referenced by a SOAP element (i.e. cid: )
    The client application builds a multipart, which has 1 text file and a jpeg file and sends
    the multipart with SOAP envelope. The server returns the multipart back to the client.
    Here is my client code:
         private void demoAttachment() throws Exception
              javax.xml.soap.MessageFactory mf = javax.xml.soap.MessageFactory.newInstance();
              javax.xml.soap.SOAPMessage msg = mf.createMessage();
              javax.xml.soap.AttachmentPart ap = msg.createAttachmentPart();
              ap.addMimeHeader("header1", "12/28/2005");
    //          ap.setContent("Hello world !", "text/plain"); // text/plain worked earlier
              MimeMultipart mmp = makeAttachment();
              ap.setContent(mmp, mmp.getContentType());
              javax.xml.soap.AttachmentPart ret = m_endpoint.sendClaim("John Smith", ap);
    private static MimeMultipart makeAttachment()
    MimeMultipart mp = new MimeMultipart();
    try {
    mp.setSubType("related");
    } catch (MessagingException e1) {
    e1.printStackTrace();
    MimeBodyPart body1 = new MimeBodyPart();
    try {
    DataHandler dh = new DataHandler(new FileDataSource(TEXT_FILE_NAME));
    body1.setDataHandler(dh);
    String ct = dh.getContentType();
    System.out.println("Content type: " + ct);
    body1.setHeader("Content-Type", ct);
    body1.setFileName("test.txt");
    mp.addBodyPart(body1);
    } catch (MessagingException e) {
    e.printStackTrace();
    MimeBodyPart body2 = new MimeBodyPart();
    try {
    DataHandler dh = new DataHandler(new FileDataSource(IMG_FILE_NAME));
    body2.setDataHandler(dh);
    String ct = dh.getContentType();
    System.out.println("Content type: " + ct);
    body2.setHeader("Content-Type", ct);
    body2.setFileName("test.jpg");
    mp.addBodyPart(body2);
    } catch (MessagingException e) {
    e.printStackTrace();
    return mp;
    -------- SOAP request and response -----------------------------------------
    TcpTunnelText: ready to rock and roll on port 5555
    TcpTunnelText: tunnelling port 5555 to port 8888 on host foo.bar.com
    POST /topDownBank/topDownBank HTTP/1.1
    Host: localhost:5555
    Connection: Keep-Alive, TE
    TE: trailers, deflate, gzip, compress
    User-Agent: Oracle HTTPClient Version 10h
    SOAPAction: "http://example.com/soapaction"
    Accept-Encoding: gzip, x-gzip, compress, x-compress
    Content-type: multipart/related;type="text/xml";boundary="----=_Part_1_33320514.1135808579711"
    Content-length: 15957
    ------=_Part_1_33320514.1135808579711
    Content-Type: text/xml
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:ns0="http://service.topdown/"
         xmlns:ns1="http://ws-i.org/profiles/basic/1.1/xsd">
         <env:Body>
              <ns0:claimDetailElement>
                   <ns0:Name>John Smith</ns0:Name>
                   <ns0:ClaimForm>cid:ID1@ClaimForm</ns0:ClaimForm>
              </ns0:claimDetailElement>
         </env:Body>
    </env:Envelope>
    ------=_Part_1_33320514.1135808579711
    Content-Type: multipart/related;
         boundary="------=_Part_0_32113234.1135808579336"
    header1: 12/28/2005
    Content-Id: <ID1@ClaimForm>
    ------=_Part_0_32113234.1135808579336
    Content-Type: text/plain; name=test.txt
    Content-Disposition: attachment; filename=test.txt
    Volume in drive C has no label.
    Volume Serial Number is DCD8-0D94
    Directory of C:\temp
    12/22/2005 03:57 PM <DIR> .
    12/22/2005 03:57 PM <DIR> ..
    03/04/2005 02:28 PM <DIR> 0128
    05/09/2005 09:10 PM 703 XMSTest1.java
    58 File(s) 237,395,939 bytes
    31 Dir(s) 49,375,744,000 bytes free
    ------=_Part_0_32113234.1135808579336
    Content-Type: image/jpeg; name=test.jpg
    Content-Disposition: attachment; filename=test.jpg
    (binary data removed from here ...)
    ------=_Part_0_32113234.1135808579336--
    ------=_Part_1_33320514.1135808579711--
    HTTP/1.1 200 OK
    Date: Wed, 28 Dec 2005 22:22:59 GMT
    Server: Oracle Containers for J2EE
    Content-Length: 15922
    Connection: Keep-Alive
    Keep-Alive: timeout=15, max=100
    Content-Type: multipart/related;type="text/xml";boundary="----=_Part_8_13238995.1135808579852"
    SOAPAction: ""
    ------=_Part_8_13238995.1135808579852
    Content-Type: text/xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:ns0="http://service.topdown/"
         xmlns:ns1="http://ws-i.org/profiles/basic/1.1/xsd">
         <env:Body>
         <ns0:claimResponseElement>cid:ID1@claimResponseElement</ns0:claimResponseElement>
         </env:Body>
    </env:Envelope>
    ------=_Part_8_13238995.1135808579852
    Content-Type: multipart/related;
         boundary="------=_Part_0_32113234.1135808579336"
    header1: 12/28/2005
    Content-Id: <ID1@claimResponseElement>
    ------=_Part_0_32113234.1135808579336
    Content-Type: text/plain; name=test.txt
    Content-Disposition: attachment; filename=test.txt
    Volume in drive C has no label.
    Volume Serial Number is DCD8-0D94
    Directory of C:\temp
    12/22/2005 03:57 PM <DIR> .
    12/22/2005 03:57 PM <DIR> ..
    03/04/2005 02:28 PM <DIR> 0128
    10/17/2005 03:54 PM 11,181,568 04_Tutorial_XMS_Webservices.doc
    05/09/2005 09:10 PM 703 XMSTest1.java
    58 File(s) 237,395,939 bytes
    31 Dir(s) 49,375,744,000 bytes free
    ------=_Part_0_32113234.1135808579336
    Content-Type: image/jpeg; name=test.jpg
    Content-Disposition: attachment; filename=test.jpg
    (binary data removed from here )
    ------=_Part_0_32113234.1135808579336--
    ------=_Part_8_13238995.1135808579852--
    Message was edited by:
    user457369

  • Issue with generation of document/literal type WSDL using Axis

    Hi All,
    I am trying to convert some Java code into WSDL using Axis 1.2 framework. I used Document/Literal style for binding.
    One of the methods in my Java code returns an array. This array is described in Axis generated WSDL as follows:
    <complexType name="ArrayOfThings">
    <complexContent>
    <restriction base="soapenc:Array">
    <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Things[]"/>
    </restriction>
    </complexContent>
    </complexType>
    But the end user(client for the web service I am hosting) says " .NET won't allow him to consume my webservice (or generate the proper reference classes) for types that derive from encoded types".
    So my question is "Would it be possible to change the webservice so that it doesn’t use that(soapenc) implementation of the array?"
    The end user is expecting something more like this:
    <s:complexType name="ArrayOfThings">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="unbounded" name="Things" nillable="true" type="tns:Things" />
    </s:sequence>
    </s:complexType>
    I am new to Web Services. So any help or guidance would be greatly appreciated.
    Thanks,
    Scott.

    Hi Dragana,
    We definitely support the ability to call a web service that exposes two operations (document/literal or not).
    Glancing through your WSDL, it looks good.
    Could you please try to tunnel the second request and see 1) what data is sent to the service and 2) what data is returned by the service?
    Can you please email us a reproduceable case so that we can help troubleshoot in parallel?
    Thank you,
    Edwin
    [email protected]
    please rename .zip to .zap

  • Document literal client

    Hi All,
    I am trying to access a document literal client service exposed by tibco business works. I modified the sample/jax-rpc/advanced/DIIHelloClient.java to access the service.
    I am stuck up now in this problem regarding serializers. ( i donno why do we need serializer here )
    the serializer/deserializer for parameter number: 0, named: "{http://markets.midwestiso.org/tibco/xml}LMPData", type: "{http://markets.midwestiso.org/tibco/xml}LMPData", is ambiguous because its class could not be determined
    at com.sun.xml.rpc.client.dii.BasicCall.serializerNotFoundException(BasicCall.java:653)
    at com.sun.xml.rpc.client.dii.BasicCall.createLiteralResponseSerializer(BasicCall.java:592)
    at com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.java:557)
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:339)
    at DIIHelloClient.testEchoString(DIIHelloClient.java:118)
    at DIIHelloClient.main(DIIHelloClient.java:44)
    The service returns an XML document in the response and the doesnot take any parameters. I am looking to get the whole XML as Document or string.
    Am i doing anything wrong here ? Any help, thoughts, links or a sample would be greately appreciated.
    regards,
    Arun

    I found the solution myself. My example was not working since i had a previous version of saaj-ri.jar
    I replaced it with saaj-impl.jar from the jwsdp1.3 and it works.... I am able to send XML in the request and receive XML in the response using SAAJ APIs on a service exposed as document/literal.
    I am posting the sample code just in case anybody again searches for this.
             URL endpoint=new URL("http://localhost:9094/tnt/services/Processes/soapPrcLmpData");
             SOAPConnectionFactory factory= SOAPConnectionFactory.newInstance();
             SOAPConnection connection = factory.createConnection();
             MessageFactory mffactory= MessageFactory.newInstance();
             SOAPMessage message= mfactory.createMessage();
             SOAPPart soapPart=msg.getSOAPPart();
             SOAPEnvelope envelope = soapPart.getEnvelope();
             SOAPBody body = envelope.getBody();
             body.addChildElement(envelope.createName("LmpRequest" , "", "http://markets.midwestiso.org/tibco/xml/response"))
             .addChildElement("LastModifiedTime").addTextNode("2003-12-12");
             message.saveChanges();
             SOAPMessage reply = connection.call(message, endpoint);
             TransformerFactory tFact=TransformerFactory.newInstance();
             Transformer transformer = tFact.newTransformer();
             Source src = reply.getSOAPPart().getContent();
             StreamResult result=new StreamResult( System.out );
             transformer.transform(src, result);
             System.out.println();
             connection.close();

  • Document/literal style wsdl with more than one port

    Recently I have changed wsdl style from rpc/encoded to document/literal as BPEL does not handle soapenc:arrayType. The wsdl contains 2 operations and few complex type definitions.
    In BPEL Designer I have created a process that invokes all operations defined in the wsdl, but only one of them will have some data in the response message and the other one will have an empty message. On the other hand, when I use stub generation to invoke Web Service everything is working fine.
    If I provide separate wsdl for each operation (in BPEL process I would have two partnerLinks instead of one) than it works fine.
    Does this mean that BPEL does not handle document/literal style endpoints with more than one port (operation)?
    I have tested this with the orabpel_2.0_J1_win32.exe and orabpel_2.0rc9_win32.exe. Web Services, used for this test, are deployed in Jboss 3.2.3 and axis-1_2beta3.
    WSDL used as partnerLink:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions targetNamespace="http://test" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://test" xmlns:intf="http://test" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types>
    <schema elementFormDefault="qualified" targetNamespace="http://test" xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="CardId">
    <sequence>
    <element name="cardType" nillable="true" type="xsd:string" />
    <element name="number" nillable="true" type="xsd:string" />
    </sequence>
    </complexType>
    <complexType name="CardIdArray">
    <sequence>
    <element maxOccurs="unbounded" name="item" nillable="true" type="impl:CardId" />
    </sequence>
    </complexType>
    <element name="getCardsReturn" type="impl:CardIdArray" />
    <complexType name="CardholderCards">
    <sequence>
    <element maxOccurs="unbounded" name="cards" nillable="true" type="impl:CardId" />
    <element name="serialNumber" nillable="true" type="xsd:string" />
    </sequence>
    </complexType>
    <element name="retrieveChReturn" type="impl:CardholderCards" />
    </schema>
    </wsdl:types>
    <wsdl:message name="retrieveChRequest" />
    <wsdl:message name="getCardsRequest" />
    <wsdl:message name="retrieveChResponse">
    <wsdl:part element="impl:retrieveChReturn" name="retrieveChReturn" />
    </wsdl:message>
    <wsdl:message name="getCardsResponse">
    <wsdl:part element="impl:getCardsReturn" name="getCardsReturn" />
    </wsdl:message>
    <wsdl:portType name="TestService">
    <wsdl:operation name="getCards">
    <wsdl:input message="impl:getCardsRequest" name="getCardsRequest" />
    <wsdl:output message="impl:getCardsResponse" name="getCardsResponse" />
    </wsdl:operation>
    <wsdl:operation name="retrieveCh">
    <wsdl:input message="impl:retrieveChRequest" name="retrieveChRequest" />
    <wsdl:output message="impl:retrieveChResponse" name="retrieveChResponse" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="TestServiceSoapBinding" type="impl:TestService">
    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="getCards">
    <wsdlsoap:operation soapAction="" />
    <wsdl:input name="getCardsRequest">
    <wsdlsoap:body use="literal" />
    </wsdl:input>
    <wsdl:output name="getCardsResponse">
    <wsdlsoap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="retrieveCh">
    <wsdlsoap:operation soapAction="" />
    <wsdl:input name="retrieveChRequest">
    <wsdlsoap:body use="literal" />
    </wsdl:input>
    <wsdl:output name="retrieveChResponse">
    <wsdlsoap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="TestServiceService">
    <wsdl:port binding="impl:TestServiceSoapBinding" name="TestService">
    <wsdlsoap:address location="http://localhost:8080/axis/services/TestService" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    Hi Dragana,
    We definitely support the ability to call a web service that exposes two operations (document/literal or not).
    Glancing through your WSDL, it looks good.
    Could you please try to tunnel the second request and see 1) what data is sent to the service and 2) what data is returned by the service?
    Can you please email us a reproduceable case so that we can help troubleshoot in parallel?
    Thank you,
    Edwin
    [email protected]
    please rename .zip to .zap

  • Document Literal Web Service Stub Error

    I am using jdeveloper 9.0.3 (necessary because we are doing OAF) and have created a Document Literal Web Service Stub. The stub runs perfectly in Jdeveloper, but when I move it to our 9iAS server (1.0.2.2.2), I get the error that it can not find the class \oracle\jdeveloper\webservices\runtime\WrappedDocLiteralStub.
    On my local machine this file is located in jdev-rt.jar, which is in /jdevbin/jdev/lib. Is there a special way to package the web service so that the jar file is included? Or is there a patch I need to apply to the apps server?
    Any help would be much appreciated.

    I am using jdeveloper 9.0.3 (necessary because we are doing OAF) and have created a Document Literal Web Service Stub. The stub runs perfectly in Jdeveloper, but when I move it to our 9iAS server (1.0.2.2.2), I get the error that it can not find the class \oracle\jdeveloper\webservices\runtime\WrappedDocLiteralStub.
    On my local machine this file is located in jdev-rt.jar, which is in /jdevbin/jdev/lib. Is there a special way to package the web service so that the jar file is included? Or is there a patch I need to apply to the apps server?
    Any help would be much appreciated.

  • Document/literal web service

    Currently I deployed an rpc/encoded ejb web service.
    The ejb handles the request and response using Java methods. I can change this web service to document/literal by changing the style=document in Servicegen. Does this mean that I have to handle the
    SOAP/XML message programmatically? In other words, more work on my part. Any input would be much appreciated.
    Micx

    Currently I deployed an rpc/encoded ejb web service.
    The ejb handles the request and response using Java methods. I can change this web service to document/literal by changing the style=document in Servicegen. Does this mean that I have to handle the
    SOAP/XML message programmatically? In other words, more work on my part. Any input would be much appreciated.
    Micx

  • Document/literal web service with WSDL

    Hi
    I is so hard to get an easily written example of how to do a Document/literal web service in java, to generate a WSDL descripbing it and then deploying it on Apache.
    I first belived that I should use JAXM. But I think it is just SOAP and there is no way to generate a WSDL file for the JAXM service, or??
    It seems that u can to document/literal style using JAX-RPC, but this is VERY strange since RPC style is the direct opposite of Document style.
    well, well
    I would be very greatful for information here.
    regards
    /Rassol

    JWSDP 1.2 includes the WS-I sample application in JWSDP_HOME/wsi-sampleapp. Several components of
    this application use document-literal operations. The architecture of the application is described
    here http://ws-i.org/SampleApplications/SupplyChainManagement/2003-04/SCMArchitecture1.0-BdAD.pdf
    The WSDL for the services is availabe from URLs in the document.
    As you say, the trick is generating the WSDL for a new service. You have two options: 1. Modify
    existing WSDL yourself. This might be fairly easy, since the only major changes will be in the
    schema. Then use a tool to generate Java source code from the WSDL. 2. Use a tool to generate WSDL
    from source files.
    I prefer option 1 myself, since that gives me total control over the schema. It allows me to
    serialize certain parts of the SOAP message as body elements, others as attributes, and others as
    header elements. Then I use the Apache Axis tool WSDL2Java with the "-s" option to generate skeleton
    service files. One big advantage to this approach is that WSDL2Java generates JavaBean class for the
    types in the WSDL schema, so I don't need to build the SOAP message with SAAJ. A service client
    generates stubs and calls the service exactly as it would for an rpc/encoded service.
    wscompile also generates service files from WSDL if you give the "-gen:server" option, but I've only
    used Axis for my services.
    Here's a sample WSDL for a document/literal service you can modify as you need. I checked it with
    the WS-I testing tools to be sure it conforms to the WS-I Basic Profile 1.0a (available at www.ws-
    i.org). Notice that the processPo operation is a request-response type operation, even though it has
    a document/literal style. This follows the recommendations in the Basic Profile.
    Cheers,
    Mike
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://www.ltree.com/wsdl/po" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:impl="http://www.ltree.com/wsdl/po" xmlns:intf="http://www.ltree.com/wsdl/po" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://www.ltree.com/types/po" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns:tns1="http://www.ltree.com/types/po"
              xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
              targetNamespace="http://www.ltree.com/types/po"
              elementFormDefault="qualified">
         <xsd:import namespace="http://schemas.xmlsoap.org/soap/envelope/"
                     location="http://schemas.xmlsoap.org/soap/envelope/"/>
         <xsd:complexType name="LineItem">
             <xsd:sequence>
                 <xsd:element name="itemId" type="xsd:string"/>
                 <xsd:element name="quantity" type="xsd:int"/>
             </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="PurchaseOrder">
             <xsd:sequence>
                 <xsd:element name="customerName" type="xsd:string"/>
                 <xsd:element name="lineItem" type="tns1:LineItem"
                          minOccurs="1" maxOccurs="unbounded" />
             </xsd:sequence>
             <xsd:attribute name="purchaseOrderId" type="xsd:string" use="required"/>
         </xsd:complexType>
         <xsd:element name="purchaseOrder" nillable="true" type="tns1:PurchaseOrder"/>
         <xsd:complexType name="CallbackEndpoint">
             <xsd:attribute name="location" type="xsd:anyURI" use="required"/>
         </xsd:complexType>
         <xsd:element name="callbackEndpoint" nillable="false" type="tns1:CallbackEndpoint"/>
         <xsd:complexType name="PurchaseOrderAck">
             <xsd:sequence>
                 <xsd:element name="poId" type="xsd:string"/>
             </xsd:sequence>
         </xsd:complexType>
         <xsd:element name="purchaseOrderAck" nillable="true" type="tns1:PurchaseOrderAck"/>
         <xsd:complexType name="InvalidCustomerNameException">
          <xsd:sequence>
           <xsd:element name="message" nillable="true" type="xsd:string"/>
           <xsd:element name="customerName" type="xsd:string"/>
          </xsd:sequence>
         </xsd:complexType>
         <xsd:element name="invalidCustomerNameException" nillable="true"
                      type="tns1:InvalidCustomerNameException"/>
      </xsd:schema>
    </wsdl:types>
       <wsdl:message name="processPoRequest">
          <wsdl:part name="callbackEndpoint" element="tns1:callbackEndpoint"/>
          <wsdl:part name="purchaseOrder" element="tns1:purchaseOrder"/>
       </wsdl:message>
       <wsdl:message name="processPoResponse">
          <wsdl:part name="purchaseOrderAck" element="tns1:purchaseOrderAck"/>
       </wsdl:message>
       <wsdl:message name="invalidCustomerNameException">
          <wsdl:part name="fault" element="tns1:invalidCustomerNameException"/>
       </wsdl:message>
       <wsdl:portType name="PurchaseOrderHandler">
          <wsdl:operation name="processPo">
             <wsdl:input message="impl:processPoRequest" name="processPoRequest"/>
             <wsdl:output message="impl:processPoResponse" name="processPoResponse"/>
             <wsdl:fault message="impl:invalidCustomerNameException" name="invalidCustomerNameException"/>
          </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="PurchaseOrderHandlerPortSoapBinding" type="impl:PurchaseOrderHandler">
          <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
          <wsdl:operation name="processPo">
             <wsdlsoap:operation soapAction="" style="document"/>
             <wsdl:input name="processPoRequest">
                <wsdlsoap:header message="impl:processPoRequest" part="callbackEndpoint" use="literal"/>
                <wsdlsoap:body parts="purchaseOrder" use="literal"/>
             </wsdl:input>
             <wsdl:output name="processPoResponse">
                <wsdlsoap:body use="literal"/>
             </wsdl:output>
             <wsdl:fault name="invalidCustomerNameException">
                <wsdlsoap:fault name="invalidCustomerNameException" use="literal"/>
             </wsdl:fault>
          </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="PurchaseOrderHandlerService">
          <wsdl:port binding="impl:PurchaseOrderHandlerPortSoapBinding" name="PurchaseOrderHandlerPort">
             <wsdlsoap:address location="http://localhost:8080/po/services/PurchaseOrderHandlerService"/>
          </wsdl:port>
       </wsdl:service>
    </wsdl:definitions>

  • JAX RPC extension: Problem with document/literal and MyType[]

    Hi,
    I have installed the JAX RPC extension and want to generate a stub from my WSDL file. The WSDL describes a document/literal binding.
    Problem:
    A webservice server method like:
    public wineshop.model.common.SimpleProducer[] getSimpleProducerList() throws RemoteException;
    is translated into a stub method like:
    public UnknownType getSimpleProducerList() throws Exception {..}
    Is an array of own types with the binding style "document/literal" not supported in JAX RPC 1.4 or is it just a bug?
    The WSDL file is generated by JAX RPC 1.4.
    I have installed JWSDP-1.5 and generated a stub with wscompile from the WSDL file. The generated stub has the correct method return type:
    public wineshop.ws.client.SimpleProducer[] getSimpleProducerList()
    throws java.rmi.RemoteException
    It there a workaround like replacing some JDev JARs with JWSDP-1.5 to solve the problem?
    Any hints are welcome.
    Thanks Markus

    repost.....

  • Leverage Inheritance Benefits in 'document/literal' Web Services

    Greetings,
    I have developed a document/literal web service that receives an object I created, say ParentObject.
    I developed it under the assumption that once I create a web service for ParentObject, I'll be able to use the same web service for ChildObject as well, which is a sub-class from ParentObject. Unfortunately, it did not work.
    Please correct me if I'm wrong; is it really not possible to leverage inheritance capabilities web services? And if it's not possible, what workaround(s) do you use in such scenarios when you don't want to create a new web service for each object type despite that they all have the same logic?
    Your thoughts are highly appreciated.
    Thanks in advance,
    Ahmed Motaz

    Jason, have you made any progress with CF7 and WS Security?
    It doesn't seem like enough information on this is available. Is it
    even possible? and how?

  • Problem with document/literal web services

    Hi,
    I need to publish a document\literal WSDL for a web service on my OC4J 10.1.2.2 because my app has an interface with a .NET system.
    I generated the WSDL with JDEV 10.1.3.3 and tried to deploy it on an OC4J 10.1.2 using JDEV 10.1.2.
    The deployment worked fine but when I'm trying to access the web service with the generated stub I'm getting the following message:
    "These methods do not conform to the restrictions imposed by the web service implementation"
    and then a list of these methods.
    Later I tried to remove the parameters from the methods and regenerated the WSDL and it worked fine, but I need the methods with the parameters.
    What can I do?
    Thanks

    Jason, have you made any progress with CF7 and WS Security?
    It doesn't seem like enough information on this is available. Is it
    even possible? and how?

Maybe you are looking for