Doc Literal vs. RPC

I'm confused about the best practice for sending attached XML messages. I had always felt that RPC was fine for this and yet I was recently told that Doc Literal is the preferred method that both IBM and Microsoft recommend for sending XML attachments.
To compound the problem it appears that SAAJ allows my RPC model to handle this task quite well. Is this all a canard or is it marketing differences between different companies ?
Inquiring if confused minds want to know.

The major problem in RPC is different company had different serilization method, for exampe, some company may make use of MIME , and the other is DIME. document based avoid this sort of confusion. but RPC is more easily to use.

Similar Messages

  • Problem with DII client for Doc/Literal with non built-in type in WL8.1 Sp2

    Hello,
    I have been trying to make this DII client for doc/literal using non built-in type to work for 2 days now.
    Any help/input will be greatly appreciated. I have added the code and wsdl below.
    BTW this is using the code first approach.
    Works perfectly fine with the clientgen generated stubs. But not with DII.
    With the stubs, following is the SOAP envelope.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:getType xmlns:n1="http://www.aeb.com/wlws">
         <n2:id xmlns:n2="java:com.aeb.types">XYS</n2:id>
         <n3:name xmlns:n3="java:com.aeb.types">Name</n3:name>
    </n1:getType>
    </env:Body>
    </env:Envelope>
    With DII (using the serializer/deserializer generated by clientgen),
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:TestType xmlns:n1="java:com.aeb.types">
         <n1:id>ABC</n1:id>
         <n1:name>Some Name</n1:name>
    </n1:TestType>
    </env:Body></env:Envelope>
    Exception
    javax.xml.rpc.soap.SOAPFaultException: Unable to find a matching Operation for this remote invocation
    <n1:TestType xmlns:n1="java:com.aeb.types">
    <n1:id>ABC</n1:id>
    <n1:name>Some Name</n1:name>
    </n1:TestType>.
         Please check your operation name.
         at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
         at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
         at com.amgen.webservice.clients.DocClient.callService(DocClient.java:83)
         at com.amgen.webservice.clients.DocClient.main(DocClient.java:35)
    Client
    System.setProperty("javax.xml.rpc.ServiceFactory","weblogic.webservice.core.rpc.ServiceFactoryImpl");
    System.setProperty("weblogic.webservice.verbose", "true");
    String targetNamespace = "http://www.aeb.com/wlws";
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName = new QName(targetNamespace, "DocWebservice");
    QName portName = new QName(targetNamespace, "DocWebservicePort");
    QName operationName = new QName(targetNamespace, "getType");
    Service service = factory.createService(serviceName);
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING);
    mapping.register(TestType.class, new QName("java:com.aeb.types","TestType"), new TestTypeCodec(), new TestTypeCodec());
    Call call = service.createCall();
    call.setOperationName(operationName);
    call.setPortTypeName(portName);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
    call.addParameter("testType", new QName("java:com.aeb.types","TestType"), TestType.class, ParameterMode.IN);
    call.setReturnType(new QName("java:com.aeb.types", "TestType"),TestType.class);
    call.setTargetEndpointAddress("http://localhost:7001/wlws/DocWebservice");
    TestType type = new TestType();
    type.setId("ABC");
    type.setName("Some Name");
    TestType res = (TestType) call.invoke(new Object[] { type });
    System.out.println(res.getName());
    TestType.java
    package com.aeb.types;
    import java.io.Serializable;
    public class TestType implements Serializable {
         private String id;
         private String name;
         public String getId() {
              return id;
         public void setId(String id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
    DocWebservice.java
    package com.aeb.webservices;
    import com.aeb.types.TestType;
    public class DocWebservice {
         public TestType getType(TestType type) {
              System.out.println("In Server....");
              System.out.println("Received : " + type.getName());
              return type;
    ServiceGen Ant Task
    <servicegen destear="${dist.dir}/wlws.ear" contexturi="wlws">
         <service javaClassComponents="com.aeb.webservices.DocWebservice"
              generateTypes="True"
              targetNamespace="http://www.aeb.com/wlws"
              serviceName="DocWebservice"
              serviceURI="/DocWebservice"
              style="document">
              <client packageName="com.aeb.ws.doc.client" />
         </service>
    </servicegen>
    WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns:tns="http://www.aeb.com/wlws" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.aeb.com/wlws">
    <types xmlns:tns="http://www.aeb.com/wlws"
    xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding"
    xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="http://www.aeb.com/wlws"
    xmlns:tp="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="http://www.aeb.com/wlws">
    <xsd:import namespace="java:com.aeb.types">
    </xsd:import>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getType"
    nillable="true">
    </xsd:element>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getTypeResponse"
    nillable="true">
    </xsd:element>
    </xsd:schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="java:com.aeb.types">
    <xsd:complexType name="TestType">
    <xsd:sequence>
    <xsd:element type="xsd:string"
    name="id"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    <xsd:element type="xsd:string"
    name="name"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="getType">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="testType"
    element="partns:getType">
    </part>
    </message>
    <message name="getTypeResponse">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="result"
    element="partns:getTypeResponse">
    </part>
    </message>
    <portType name="DocWebservicePort">
    <operation name="getType">
    <input message="tns:getType">
    </input>
    <output message="tns:getTypeResponse">
    </output>
    </operation>
    </portType>
    <binding type="tns:DocWebservicePort"
    name="DocWebservicePort">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http">
    </soap:binding>
    <operation name="getType">
    <soap:operation style="document"
    soapAction="">
    </soap:operation>
    <wsr:reliability persistDuration="60000">
    </wsr:reliability>
    <input>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </input>
    <output>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </output>
    </operation>
    </binding>
    <service name="DocWebservice">
    <port name="DocWebservicePort"
    binding="tns:DocWebservicePort">
    <soap:address location="http://localhost:7001/wlws/DocWebservice">
    </soap:address>
    </port>
    </service>
    </definitions>
    Thanks
    Aspert

    Hello,
    I have been trying to make this DII client for doc/literal using non built-in type to work for 2 days now.
    Any help/input will be greatly appreciated. I have added the code and wsdl below.
    BTW this is using the code first approach.
    Works perfectly fine with the clientgen generated stubs. But not with DII.
    With the stubs, following is the SOAP envelope.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:getType xmlns:n1="http://www.aeb.com/wlws">
         <n2:id xmlns:n2="java:com.aeb.types">XYS</n2:id>
         <n3:name xmlns:n3="java:com.aeb.types">Name</n3:name>
    </n1:getType>
    </env:Body>
    </env:Envelope>
    With DII (using the serializer/deserializer generated by clientgen),
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body>
    <n1:TestType xmlns:n1="java:com.aeb.types">
         <n1:id>ABC</n1:id>
         <n1:name>Some Name</n1:name>
    </n1:TestType>
    </env:Body></env:Envelope>
    Exception
    javax.xml.rpc.soap.SOAPFaultException: Unable to find a matching Operation for this remote invocation
    <n1:TestType xmlns:n1="java:com.aeb.types">
    <n1:id>ABC</n1:id>
    <n1:name>Some Name</n1:name>
    </n1:TestType>.
         Please check your operation name.
         at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
         at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
         at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
         at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
         at com.amgen.webservice.clients.DocClient.callService(DocClient.java:83)
         at com.amgen.webservice.clients.DocClient.main(DocClient.java:35)
    Client
    System.setProperty("javax.xml.rpc.ServiceFactory","weblogic.webservice.core.rpc.ServiceFactoryImpl");
    System.setProperty("weblogic.webservice.verbose", "true");
    String targetNamespace = "http://www.aeb.com/wlws";
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName = new QName(targetNamespace, "DocWebservice");
    QName portName = new QName(targetNamespace, "DocWebservicePort");
    QName operationName = new QName(targetNamespace, "getType");
    Service service = factory.createService(serviceName);
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING);
    mapping.register(TestType.class, new QName("java:com.aeb.types","TestType"), new TestTypeCodec(), new TestTypeCodec());
    Call call = service.createCall();
    call.setOperationName(operationName);
    call.setPortTypeName(portName);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
    call.addParameter("testType", new QName("java:com.aeb.types","TestType"), TestType.class, ParameterMode.IN);
    call.setReturnType(new QName("java:com.aeb.types", "TestType"),TestType.class);
    call.setTargetEndpointAddress("http://localhost:7001/wlws/DocWebservice");
    TestType type = new TestType();
    type.setId("ABC");
    type.setName("Some Name");
    TestType res = (TestType) call.invoke(new Object[] { type });
    System.out.println(res.getName());
    TestType.java
    package com.aeb.types;
    import java.io.Serializable;
    public class TestType implements Serializable {
         private String id;
         private String name;
         public String getId() {
              return id;
         public void setId(String id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
    DocWebservice.java
    package com.aeb.webservices;
    import com.aeb.types.TestType;
    public class DocWebservice {
         public TestType getType(TestType type) {
              System.out.println("In Server....");
              System.out.println("Received : " + type.getName());
              return type;
    ServiceGen Ant Task
    <servicegen destear="${dist.dir}/wlws.ear" contexturi="wlws">
         <service javaClassComponents="com.aeb.webservices.DocWebservice"
              generateTypes="True"
              targetNamespace="http://www.aeb.com/wlws"
              serviceName="DocWebservice"
              serviceURI="/DocWebservice"
              style="document">
              <client packageName="com.aeb.ws.doc.client" />
         </service>
    </servicegen>
    WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns:tns="http://www.aeb.com/wlws" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.aeb.com/wlws">
    <types xmlns:tns="http://www.aeb.com/wlws"
    xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding"
    xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="http://www.aeb.com/wlws"
    xmlns:tp="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="http://www.aeb.com/wlws">
    <xsd:import namespace="java:com.aeb.types">
    </xsd:import>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getType"
    nillable="true">
    </xsd:element>
    <xsd:element xmlns:tp="java:com.aeb.types"
    type="tp:TestType"
    name="getTypeResponse"
    nillable="true">
    </xsd:element>
    </xsd:schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="java:com.aeb.types"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="java:com.aeb.types">
    <xsd:complexType name="TestType">
    <xsd:sequence>
    <xsd:element type="xsd:string"
    name="id"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    <xsd:element type="xsd:string"
    name="name"
    minOccurs="1"
    maxOccurs="1"
    nillable="true">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="getType">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="testType"
    element="partns:getType">
    </part>
    </message>
    <message name="getTypeResponse">
    <part xmlns:partns="http://www.aeb.com/wlws"
    name="result"
    element="partns:getTypeResponse">
    </part>
    </message>
    <portType name="DocWebservicePort">
    <operation name="getType">
    <input message="tns:getType">
    </input>
    <output message="tns:getTypeResponse">
    </output>
    </operation>
    </portType>
    <binding type="tns:DocWebservicePort"
    name="DocWebservicePort">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http">
    </soap:binding>
    <operation name="getType">
    <soap:operation style="document"
    soapAction="">
    </soap:operation>
    <wsr:reliability persistDuration="60000">
    </wsr:reliability>
    <input>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </input>
    <output>
    <soap:body namespace="http://www.aeb.com/wlws"
    use="literal">
    </soap:body>
    </output>
    </operation>
    </binding>
    <service name="DocWebservice">
    <port name="DocWebservicePort"
    binding="tns:DocWebservicePort">
    <soap:address location="http://localhost:7001/wlws/DocWebservice">
    </soap:address>
    </port>
    </service>
    </definitions>
    Thanks
    Aspert

  • Using doc/literal wrapped?

    I'm working on a J2EE 1.4 web application that is required to be portable accross as many different app servers as possible. We're adding web services to the applciation, so am looking for a portable approach.
    I decided upon using J2EE 1.4 (so JAX-RPC 1.1), doc/literal wrapped, and using JWSDP 1.6 to generate interface types from the WSDL, in "wsi,unwrap" mode. This works fine on JBoss 4.0.4. However when running the same code on WebLogic 9.2, the SOAP requests are invalid because WebLogic generates the wrapper tags twice. For example:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <b><m:Search xmlns:m="http://www.abm-uk.com/abmpegasus/v4.0/gms">
    <m:Search></b>
    <Item>
    <m:BarCode>1234</m:BarCode>
    </Item>
    <Item>
    <m:BarCode>9876</m:BarCode>
    </Item>
    <Item>
    <DPCI>
    <m:DepartmentNumber>010</m:DepartmentNumber>
    <m:ClassNumber>11</m:ClassNumber>
    <m:ItemNumber>4444</m:ItemNumber>
    </DPCI>
    </Item>
    <b></m:Search>
    </m:Search></b>
    </soapenv:Body>
    </soapenv:Envelope>
    Is this a known issue with WebLogic? Or does WebLogic perhaps not support the JAX-RPC 1.1 "unwrap" mode?

    As I've investigated the issue some more, I've found that the real issue is receiving an attachment on the SOAP response from the BPEL process. Using a Doc/Lit-Wrapped WSDL, I can receive a request with an attachment, and add it to outgoing requests successfully. But when I do a straight copy from the request message to the response message (Echo Service), the response contains the correct "href" attribute but there is no attachment, and moreover, no MIME multipart message is returned.
    NOTE: I was successful in using an RPC/Literal WSDL to accomplish the successful echo of the attachment.
    Also, when looking in the OPMN logs, I see the following line for the RPC-based BPEL process, but not for the Doc/Lit:
    <2009-11-23 13:43:35,684> <DEBUG> <attachment.collaxa.cube.engine> <CXBinaryDataHandler::createDataSource> for binary location=uuid:aaa091d17e1b5545:67c00c53:1252285bf07:-7fc2
    <2009-11-23 13:43:35,716> <DEBUG> <attachment.collaxa.cube.engine.data> <ConnectionFactory::getConnection> GOT CONNECTION 1 Autocommit = false
    <2009-11-23 13:43:35,716> <DEBUG> <attachment.collaxa.cube.engine> <CXBinaryDataHandler::createDataSource> for binary location=uuid:aaa091d17e1b5545:67c00c53:1252285bf07:-7fc1
    and the "binary location" value corresponds with the "href" attribute seen in the BPEL audit logs.

  • How to get a doc//literal web service with JWSDP1.3

    I can build a rpc/encoded service (based the tutorial),
    but I need a doc/literal.
    Because I have a J2ME client.
    How can I do it?
    thanks

    Do you want to see if Arun's white paper helps you? I checked and he talkks about this at the end of his first scenario, at https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario1.
    - eduard/o

  • Develop Doc/Literal WS with a bottom up approach

    Hi all,
    I am trying to work with the jax rpc implementation of OC4J 10.1.2.
    I saw on OTN how build doc/literal web services with a top down approach but not with a bottom up approach. I can t see any tool like java2wsdl and wsdl2java of axis in the official documentation.
    I know that the next release 10.1.3 will provide these fonctionalities by ANT scripts but no for current production's release.
    Is there, somewhere ant scripts or librairies which could help me ?
    Thanks in advance.
    Alexandre
    My environment
    OC4J 10.1.2
    JDK 1.4.2
    Maven, Ant, Eclipse

    In 10.1.2, the was to build Web services using the bottom-up development pattern is to use the WebServicesAssemble.jar file. If you specify the document style for the message format, in your configuration file, you will be able to assemble such application.
    As to the ant integration, it will be limited to using the java task:
    <target name="createpackage">
    <java jar="${ORACLE_HOME}/webservices/lib/WebServicesAssembler.jar" fork="yes"
         failonerror="true">
    <arg value="-config"/>
    <arg value="./config.xml"/>
    </java>
    </target>
    Hope this helps,
    Eric

  • Doc/literal attachments

    Dear all,
    I'm trying to write a Web Service that returns an XML-document from a server.
    I tried three kinds of implementations using javax.xml.transform.Source and javax.activation.DataHandler as follows:
    // ex 1
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import javax.xml.transform.Source;
    public interface XML extends Remote {
         public Source Xml() throws RemoteException;
    // ex2
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import javax.activation.DataHandler;
    public interface XML extends Remote {
         public DataHandler Xml() throws RemoteException;
    // ex3
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import javax.activation.DataHandler;
    public interface XML extends Remote {
    // I return a JavaBean with get/set -Methods for the DataHandler
         public ObjWithDataHandlerGetSetMethods Xml() throws RemoteException;
    Building the Web Service with ant (in wscompile)... -f:wsi -f:documentliteral ... returns the following message:
    ex1:
    [exec] error: Attachment types are not supported in literal mode - Type:
    javax.xml.transform.Source"
    ex2 + ex3:
    [exec] error: Attachment types are not supported in literal mode - Type:
    javax.activation.DataHandler"
    It is important to emphasize that I only encounter these problems when working in doc/literal mode. Please don't post any rpc/endoding answers. I want to write in doc/literal in order to follow the WS-I Basic Profile.
    My question is: Is it at all possible to send attachments in literal mode? If yes, how?
    Thank YOU!

    If you look at the release notes: http://java.sun.com/webservices/docs/1.3/jaxrpc/ReleaseNotes.html
    The "Current Limitations" section states:
    "Collection classes and attachments are not supported in document/literal or rpc/literal."

  • Java.lang.NullPointerException in 8.1 with soap doc literal binding

    hi,
    scenario:
    1) web service with soap doc literal binding on external server. web service
    is expecting a complex input argument
    2) generate web service control in weblogic 8.1 (sp1) workshop
    3) wrote jws file to use the web service control
    4) run test and hit the following call stack
    NOTE: this is only encountered when the web service is expecting a complex input
    argument. if the web service is expecting a simple input argument, it works fine
    java.lang.NullPointerException at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:90)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:337) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
    com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
    com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
    at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
    at com.bea.wlw.runtime.jws.call.SoapCall.<init>(SoapCall.java:150) at com.bea.wlw.runtime.jws.call.SoapHttpCall.<init>(SoapHttpCall.java:61)
    at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:559)
    at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:359)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420) at
    com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393) at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:387)
    at $Proxy8.DocLitQueryByExample(Unknown Source) at doc_lit_bs.bs_doc_litControlTest.DocLitQueryByExample(bs_doc_litControlTest.jws:31)
    is there a workaround to the problem?

    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=4270
    Bolei wrote:
    >
    hi,
    scenario:
    1) web service with soap doc literal binding on external server. web service
    is expecting a complex input argument
    2) generate web service control in weblogic 8.1 (sp1) workshop
    3) wrote jws file to use the web service control
    4) run test and hit the following call stack
    NOTE: this is only encountered when the web service is expecting a complex input
    argument. if the web service is expecting a simple input argument, it works fine
    java.lang.NullPointerException at com.bea.xml.marshal.AtomicValueMPlan.marshal(AtomicValueMPlan.java:90)
    at com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:337) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
    com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MarshalContext.writeElementObjectOrHref(MarshalContext.java:426)
    at com.bea.xml.marshal.BaseMPlan.writeValueUsingStrategy(BaseMPlan.java:307) at
    com.bea.xml.marshal.BaseMPlan.marshal(BaseMPlan.java:349) at com.bea.xml.marshal.MethodMPlan.marshal(MethodMPlan.java:260)
    at com.bea.wlw.runtime.core.dispatcher.DispMessage.marshalXml(DispMessage.java:386)
    at com.bea.wlw.runtime.jws.call.SoapCall.<init>(SoapCall.java:150) at com.bea.wlw.runtime.jws.call.SoapHttpCall.<init>(SoapHttpCall.java:61)
    at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:559)
    at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:359)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420) at
    com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393) at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:387)
    at $Proxy8.DocLitQueryByExample(Unknown Source) at doc_lit_bs.bs_doc_litControlTest.DocLitQueryByExample(bs_doc_litControlTest.jws:31)
    is there a workaround to the problem?

  • Wscompile question with doc/literal ws

    This is probably a very basic question, but I'm using wscompile to generate some client stub code for a doc/literal web service. Everything works okay, i can execute the service with no problem.
    My question is why does the tool generate the interface with individual parameters instead of an object. The WSDL defines the message as a complextype with multiple elements, and the wscompile tool does generate a java class based on the complextype but then the interface doesn't use it. So for a large document I end up with a lot of parameters to pass.
    Here is an example of what I'm referring to:
    In the WSDL the message is represented like this:
    <xsd:element name="requestservice">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element ref="ti:firstname"/>
                    <xsd:element ref="ti:lastname"/>
                    <xsd:element ref="ti:address"/>
                    <xsd:element ref="ti:city"/>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>So i would expect the interface to take an object called Requestservice instead of this:
    public java.lang.String requestservice(java.lang.String firstname, java.lang.String lastname, java.lang.String address, java.lang.String city) I'm probably not doing something right but if anyone could point me in the right direction, it would be great. Doing this in .Net(I know bad, but I have to) I get an object reference instead of multiple parameters to pass. Which with a large document is a whole lot easier to deal with.
    thanks for any suggestions.
    markg

    For anyone interested - I have found the following gem hidden deep inside OTN:
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/docservice/index.html
    Its a simple Doc literal WS with client.jsp that can be deployed on 9.0.3/9.0.4. Just got it working on my standalone 904 - beautiful stuff!

  • How to create a Doc/Literal WebService that supports SOAP attachment?

    Hi,
    I need a sample that works with OC4J to provide a doc/literal WS which supports attachment for input/output.
    How to create that with JDeveloper?
    Thanks!

    Hi there!
    Thanks for the info. Actually I am using v10.1.3.2 (OracleAS and Jdeveloper) and tried to follow the "Working With Attachments'. However, the steps described there don't use JDeveloper.
    I tried to feed the Example 2-2 WSDL into JDeveloper's Create J2EE 1.4 Java Web Service from WSDL wizard but it doesn't work due to this line:
    <xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd"
    schemaLocation="http://ws-i.org/profiles/basic/1.1/xsd"/>
    It should be this:
    <xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd" schemaLocation="WS-ISwA.xsd"/>     
    WS-ISwA.xsd:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
    targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd"
    xmlns:tns="http://ws-i.org/profiles/basic/1.1/xsd">
         <xsd:simpleType name="swaRef">
              <xsd:restriction base="xsd:anyURI" />
         </xsd:simpleType>
    </xsd:schema>
    But then not sure what to do with step 3 & 4 in the wizard. So kind of confusing....
    So far, I couldn't find a complete doc/literal WS/attachment sample (for OracleAS). Wonder if you know of any out there.
    Thanks,
    Daniel

  • Wsdltoservice  and doc literal

    Hi,
    I have two questions.
    a) I use wsdltoservice to generate java interface from wsdl file. My wsdl file has imports a schema. When i ran wsdltoservice, both schema and wsdl are in the same directory and the import looked like
    <xsd:import namespace="somenamespace" schemaLocation="schema.xsd">
    Generated webservice.xml has only wsdl embedded. What will happen to the schema. Any client accessing the wsdl will try to look at the wsdl at <http://localhost:7001/.../schema.xsd".
    My question is how to package the imported schema along with the wsdl
    b) Autotyping doesn't work for complex wsdl. I ran wsdl2service to get the operation in terms of SOAPElement.
    Eg: My operation looks like
    public javax.xml.soap.SOAPElement GetResourcesDcoument(javax.xml.soap.SOAPElement document)
    But when i send the xml fragment to that endpoint i get this following error
    javax.xml.soap.SOAPException: failed to deserialize
    xml:weblogic.xml.schema.binding.DeserializationException: mapping lookup failure for xml type
    Where is the mapping involved here? I don't think weblogic should have problem deserialzing xml to SOAPElement

    For anyone interested - I have found the following gem hidden deep inside OTN:
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/docservice/index.html
    Its a simple Doc literal WS with client.jsp that can be deployed on 9.0.3/9.0.4. Just got it working on my standalone 904 - beautiful stuff!

  • Documentation for doc literal processing

    I'm struggling with an existing that uses doc literal services, but I can't get it to work in oc4j 10g preview.
    I've tried the doc_lit demo that Oracle provides -- loading the WSDL from the original source (ws-i.org) works fine, but trying to load it locally produces errors. The first error is a complaint that the WSDL doesn't define a service, so I added the service as suggested in another thread. However, at that point although the first pass through wsa generates things, it does not generate the correct type classes, so the second pass (update-impl) through wsa fails.
    I'm confused as to why the WSDL processing is different depending on whether it's loaded from ws-i.org or the filesystem. And I'm confused about how the WSDL should properly look to generate the type classes.
    Any pointers to documentation I may have missed, or any other clues or help would be very much appreciated.

    I'm looking for the same thing -
    Were you able to location any documentation?
    I've been trying to get my hands on the documentation
    for the C4. Sun's doc site does not have this product
    listed at all. The product documentation link
    (http://docs.sun.com/app/docs/prod/1878#hic) just
    returns " The requested item could not be found."
    I've even tried opening up a case with Sun. First,
    the support people had no idea what the C4 was. After
    3 days and 3 support engineers, I finally found one
    who understood what this product was, but I was then
    told that getting the documentation would be on a
    time and materials basis. I'd rather not have to pay
    $400+ for documentation that should be on their
    website, just like all their other equipment. I'm
    currently using the Quantum PX502 documentation as a
    reference, but I'd really like to see Sun specific
    documentation.
    Any ideas?
    Thanks.I'm looking for the same thing -
    Were you able to location any documentation?

  • Doc/Literal service on 10g R2

    hi all,
    Can you please provide pointers to any Oracle documentation that can help me build Document/Literal web services on OAS 10g R2.
    Thanks,
    M.

    For anyone interested - I have found the following gem hidden deep inside OTN:
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/docservice/index.html
    Its a simple Doc literal WS with client.jsp that can be deployed on 9.0.3/9.0.4. Just got it working on my standalone 904 - beautiful stuff!

  • Doc/Literal Web Services in OmniPortlet

    Hi I was wondering if OmniPortlet has a problem calling Document/Literal type of Web Services? Because I tried calling 2 such WS, one of which is .NET, the other is developed in JDeveloper.
    In both cases, OminPortlet sends the encodingStyle attribute in its SOAP body, which shouldn't occur for doc/lit types right? The .NET WS can accept the request though, while the JDev one can't.

    This is the WSDL for the .NET service:
    <wsdl:definitions targetNamespace="http://tempuri.org/">
         <wsdl:types>
         <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
         <s:element name="HelloWorld">
    <s:complexType/>
    </s:element>
         <s:element name="HelloWorldResponse">
         <s:complexType>
         <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
         <wsdl:message name="HelloWorldSoapIn">
    <wsdl:part name="parameters" element="tns:HelloWorld"/>
    </wsdl:message>
         <wsdl:message name="HelloWorldSoapOut">
    <wsdl:part name="parameters" element="tns:HelloWorldResponse"/>
    </wsdl:message>
         <wsdl:portType name="ServiceSoap">
         <wsdl:operation name="HelloWorld">
    <wsdl:input message="tns:HelloWorldSoapIn"/>
    <wsdl:output message="tns:HelloWorldSoapOut"/>
    </wsdl:operation>
    </wsdl:portType>
         <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
         <wsdl:operation name="HelloWorld">
    <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document"/>
         <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
         <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
         <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
         <wsdl:operation name="HelloWorld">
    <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document"/>
         <wsdl:input>
    <soap12:body use="literal"/>
    </wsdl:input>
         <wsdl:output>
    <soap12:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
         <wsdl:service name="Service">
         <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
    <soap:address location="http://137.132.1.150:83/service.asmx"/>
    </wsdl:port>
         <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
    <soap12:address location="http://137.132.1.150:83/service.asmx"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

  • 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

  • Java.lang.Error: JAX-RPC 1.1 method is not supported in WLS 8.1 clients.

    We have some web services that run under OC4J 10.1.3.4. We have various JEE 'client' apps (JSF, servlets etc.) that use these web services. These JEE apps also run under OC4J.
    We started a migration project from oc4j to weblogic 10.3.2. In phase 1 we want to move these JEE 'client' apps to weblogic. In phase 2 we want to move the web services themselves to weblogic with adjustments to the JEE 'client' apps as needed.
    However we ran into an issue during this phase 1. Deploying these JEE 'client' apps to weblogic results in an error like this:
    java.lang.Error: JAX-RPC 1.1 method is not supported in WLS 8.1 clients. If you are attempting to run an OC4J 10.1.3 JAX-RPC client in WLS, please see the Web Service Migration Guide for instructions.
    We are including Oracle web services client libraries (http://download.oracle.com/otn/java/oc4j/1013/wsclient_extended.zip) in these JEE 'client' apps's war files because weblogic does not have them.
    What part of Web Service Migration Guide is the above error message talking about? Do we have to re-generate the client side proxies for all these web services using weblogic's clientgen task in 'JAXRPC' mode? Many of these web services are doc/literal jax-rpc web services. Or does the migration guide recommend we migrate the web services first to weblogic? Any other specific information on working around this error message would be greatly appreciated.

    Hi,
    I had the same issue but I just managed to fix it. You must upgrade and/or regenerate you proxy. This creates new classes (possibily in a new package) that you must use in your code. I had this error because the classes directory was not clean after the rebuild and the old classes (in the old package) were still present, so the compilation was successful with the old classes. So clean your classes directories, regenerate your proxy and use the new classes in your code.
    Regards,
    Sylvain

Maybe you are looking for

  • Best practice for audit management

    Hi, Is there any best practice for audit management in SAP ?

  • Problems with CIF (Logical system not assign to BSG)

    Hello, We are sending all master data from ECC to APO. We set up the CIF in DEV and all worked fine. But when we try to send the data from ECC to APO in QA an error appears. It says that the logical system is not assign in the BSG. Apparently the con

  • Querying user settings

    Hi, After quite a bit of experience developing ASP gadgets for version 4.5, we've recently moved to Plumtree version 5 and .Net. One thing we would like to be able to do is provide a web service for use by other applications (outside the portal) whic

  • Create an applescript to automate PDF compare?

    I need to create an applescript to automate comparing B4 and After PDF. Can this be done with applescripting.

  • I try to insert a disc but it doesn't take it. HELP!

    Alright, I was just working off of a disc in my computer yesterday. Today I sit down and eject that disc to put a new one in. That disc ejects just as it always does with no problems. But now when I try to put a new disc in it stops it. Meaning the d