Webservice... Binding Style: Document

Hi,
I am trying to create a web service with Document literal binding.
This is what i am using..
<cfcomponent>
  <cffunction name="listBooks"
    access="remote"
    returntype="xml"
    output="yes"
style = "document">
But every time when i review the wsdl file.. i still the that the binding is "rpc"..  its not at all changing..
</wsdl:portType>
- <wsdl:binding name="myservice.cfcSoapBinding" type="impl:myservice">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="listBooks">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="listBooksRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ASRdev" use="encoded" />
</wsdl:input>
- <wsdl:output name="listBooksResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ASRdev" use="encoded" />
</wsdl:output>
Please help...........................
-ifaz

Hi,
I am trying to create a web service with Document literal binding.
This is what i am using..
<cfcomponent>
  <cffunction name="listBooks"
    access="remote"
    returntype="xml"
    output="yes"
style = "document">
But every time when i review the wsdl file.. i still the that the binding is "rpc"..  its not at all changing..
</wsdl:portType>
- <wsdl:binding name="myservice.cfcSoapBinding" type="impl:myservice">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="listBooks">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="listBooksRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ASRdev" use="encoded" />
</wsdl:input>
- <wsdl:output name="listBooksResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ASRdev" use="encoded" />
</wsdl:output>
Please help...........................
-ifaz

Similar Messages

  • BPEL using binding style='document'

    Hi guys,
    I am new to BPEL. I was wondering if anyone could tell me if Collaxa has any deployable examples that use a binding style='document' instead of rpc for its bindings in WSDL and SOAP?
    Any help would be appreciated,
    Thanks in advance
    Faraz Khan

    Faraz,
    Most of our BPEL samples expose a document style interface to their client. The only that do not are the "C:\orabpel\samples\demos\IBMSamples".
    On the other side, BPEL PM can call both document and rpc style service.
    Edwin

  • SOAP in XI: message use="encoded" and binding/@style="rpc"

    Hi
    Hope somebody who is familiar with XIs SOAP implementation could give the answer for my questions. Problem is that the SOAP server is not working but I am afraid that the reasons are not really simple.
    In our company we have to provide some SOAP services. I have entered as much as I could in IR ... including a simple scenario. Then imported the scenario to ID and the wizard created a number of agreements and determinations...
    As I need to describe the service to external parties, then I used IDs Web Service definition tool to generate the WSDL.
    But as the external messaging framework (for us a preprogrammed SOAP client) is fixed, I noticed that there are some differences that might matter.
    XI generated WSDL where SOAP binding has
    wsdl:binding/soap:binding/@style="document" but I would need it to be "rpc"
    And the second thing is that in binding message bodies have attribute @use="literal" but as the messages should have several parts then it should be "encoded" (and encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    also is needed then).
    Could somebody explain if these may be the reasons why the soap server does not work. And if there is a way to define soap interface so that it would have above mentioned properties as needed.
    A easy question also... I would need for a method to have an empty message... inside soap body there should be just a tag with the message name and no content. But I can not figure out how to create a message type with no datatype.
    Thanks for any input!

    Hi, Stefan
    Thanks for the answer. To clear my questions: we want to deploy XI as the SOAP server (sry I have not figured out if it is a sender or receiver channel by name - all this inbound-outbound naming in XI is quite complex). Our SOAP server/XI is actually  just one part of a big SOAP network and MAFIA it uses rpc styled SOAP messages.
    The note is really useful, but still it does not give any hint how to make a RPC styled SOAP interface. So the problem is still up for me. As I am not very familiar with WSDL bindings and SOAP... for the message it self, is there any difference as for the RPC vs DOCUMENT style is discussed? Is it possible that the physical structure of a SOAP envelope could be the same?
    And the second question: is there a way in IR to define several parts for a message. Something like:
    <message name="isiku_andmed">
      <part name="paring" type="tns:isiku_andmed_paring" />
      <part name="keha" type="tns:isiku_andmed_keha" />
    </message>

  • WebService Unrecognized binding style error

    I am trying to access a webservice method throught action
    Script. I just need to call a method " RequestSomeMethod"and send 2
    parameters. But am getting following error :
    RPC Fault faultString="Unrecognized binding style 'null'.
    Only 'document' and 'rpc' styles are supported."
    faultCode="EncodingError" faultDetail="null"
    I am not expecting anything back from the webservice. I just
    need to call the method so that it takes some action.
    Can please somebody help me with this and tell me why am I
    getting this error and how to get rid of it?
    Attacjed is the code I am using:
    <?xml version="1.0"?>
    <mx:Button xmlns:mx="
    http://www.adobe.com/2006/mxml"
    click="useWebService()" width="80%" >
    <mx:Script>
    <![CDATA[
    import mx.rpc.soap.LoadEvent;
    import mx.controls.Alert;
    import mx.rpc.http.HTTPService;
    import mx.rpc.soap.WebService;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    private var ws:WebService;
    private var para1:Number;
    private var para2:int;
    override public function set data(value:Object):void
    para1=1;
    setStyle("color", "red");
    enabled=false;
    label ="Do not click";
    para2=0
    public function useWebService():void {
    ws = new WebService();
    ws.addEventListener("fault", faultHandler);
    ws.addEventListener(LoadEvent.LOAD,wsLoaded);
    ws.addEventListener(ResultEvent.RESULT, result_listener);
    ws.wsdl= "someurl?wsdl";
    ws.loadWSDL();
    private function wsLoaded(loadEvent:Event):void{
    ws.RequestSomeMethod(para1, para2);
    public function echoResultHandler(event:ResultEvent):void {
    Alert.show("WSDL returned");
    public function faultHandler(event:FaultEvent):void {
    trace(event.fault);
    public function result_listener(event:ResultEvent):void {
    ]]>
    </mx:Script>
    </mx:Button>

    In the wsdl file that I am accessing, some of the tags it has
    are as below. It does not have style property in soap binding tag,
    but is in operation tag. Is that OK? or does flex expect it to be
    in soap binding tag and hence give me this error?:
    - <wsdl:binding name="abc" type="tns:IJK">
    <wsp:PolicyReference URI="#XYZ" />
    <soap12:binding transport="
    http://schemas.xmlsoap.org/soap/http"
    />
    - <wsdl:operation name="RequestDetails">
    <soap12:operation soapAction="
    http://tempuri/RequestDetails"
    style="document" />
    - <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>

  • How to call a webservice with SOAP Binding Style RPC

    Hi Guys,
    I'm pretty new to the LiveCycle ES product and I'm trying to call a web service that is of SOAP binding style 'RPC'. After some research I found out that Adobe LC ES only support WSDL files of doc/literal type.
    My question is, is there a workaround for calling RPC style web services? can RPC style web services be converted into doc/literal type?
    Any information regarding this would be greatly appreciated.
    Kazz.

    Hello,
    I had the same problem and I've regenerated my WSDL ( Apache Axis ) with docu/litteral parameters.
    I think it's the only way...
    thomas

  • How to use JDBC Positional Binding Style & ExecuteWithParams?

    Can anyone provide any help here including any documentation on how to configure this (I've checked online help and the developer guide.)
    When defining multiple Bind Position variables on a View Object (using sql statement binding style: JDBC Positional), should I defined multiple bind variable names? Otherwise, if I don't, when I use ExecuteWithParams operation to create the data control, only one input variable field is displayed. I can get a single bind position variable to work, but am struggling on how to configure / get multiple bind position variables to work with ExecuteWithParams.
    Here's my current configuration:
    1. Define View Object with two JDBC Positional Binding Parameters
    -- Bind Variables: name=parm1 (???should I define a second bind variable name???)
    -- Bind Positions = 0,1
    -- SQL Statement add another position var in where clause: "match (zip) against (CONCAT(?,'*') IN BOOLEAN MODE) and "match (name) against (CONCAT(?,'*') IN BOOLEAN MODE)
    2. On a JSF page, drag ExecuteWithParams operation from data control onto the JSF page. If I have defined only one bind variable name, only one input field is displayed (and one field label that I defined for that bind variable), but I need two input fields - one for each bind position variable. How do I set this up?
    Back-end Database is MySQL 5.0.1 which is why I am using binding stye JDBC positional.
    Thanks, Tom
    Message was edited by:
    javaX

    I did some more testing and the problem is that the queries work with one bind position variable but not with two. I created two simple view objects off of the same entity object to test:
    #1 - ViewObject with one bind position variable - where clause: where id > ?
    #2 - ViewObject with two bind position variables - where clause: where id > ? and id < ?
    I created two separate .jspx pages, view1.jspx (one input field) and view2.jspx (two input fields), for each view object by dragging ExecuteWithParams operation onto the JSF page.
    The .jspx page with one input field works (returns result sets.) The view2.jspx page with two input fields does not work - the query does not return any result sets (no errors produced, it just does not return any rows) - I've tested my query outside of jdeveloper and it works fine. I also tried switching my inputs to make sure I did not have an illogical query (i.e., id >100 and id< 1).
    Is there anything different / extra I need to do to use two bind position variables?
    I'm STUCK HERE.
    Everything in this simple test was identical except for using 2 input variables versus 1.
    Technology stack is: jdeveloper 10.1.3, jsf/ADF BC, mySQL 5.01
    Since I now understand what the problem is better, I'm going to re-post this as a new topic that more appropriately describes the problem, "Queries not working with multiple bind position variables?"
    Message was edited by:
    javaX

  • SCA project with webservices binding is failing in WLS 12.1.2.0

    While I am able to successfully  deploy a SCA project with an EJB binding in it, application is failing (deploying ok, but not recognized as an SCA app) if I include a webservices binding in it. Apparently SCAContainer is failing to locate a class file. I searched across entire weblogic installation for the missing class file, and could not locate the class in any of the jars under MW_HOME.
    And in the weblogic sca console extension, I see the following message:
    This is not a WebLogic SCA application or WebLogic SCA integration is not enabled.
    <Aug 25, 2013 8:40:00 AM EDT> <Warning> <HTTP> <BEA-101162> <User defined listener weblogic.sca.container.WlsScaContextListener failed: java.lang.NoClassDefFoundError: Lweblogic/wsee/databinding/WsRuntime;.java.lang.NoClassDefFoundError: Lweblogic/wsee/databinding/WsRuntime;
            at java.lang.Class.getDeclaredFields0(Native Method)
            at java.lang.Class.privateGetDeclaredFields(Class.java:2387)
            at java.lang.Class.getDeclaredFields(Class.java:1796)
            at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getDeclaredFields(PrivilegedAccessHelper.java:253)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            Truncated. see log file for complete stacktrace

    Also, i just deployed the SCA shopping cart example included with WLS, and it also failed with the same weblogic.wsee.databinding.WsRuntime class not found error! Issues with my installation or problem with 12.1.2.0?

  • Why View Object Editor only allow "JDBC Positional" binding style?

    HI, I want to implement the following screencast tutorial: http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/threesearchpages/threesearchforms_partthree.html?_template=/ocom/technology/content/print
    but I can't put the necesary "Oracle Named" binding style to create a sql statement with named bind variables like parametes. JDev 10.1.3.2 only allow JDBC Positional and I can't follow the above example.
    Regards.
    Alberto

    Hi,
    I guess that you are using a standard SQL Flavor and Type map.
    If you want to use these Oracle's JDBC features, you have to use Oracle SQL Flavor.
    (and you can use the Oracle Named" binding style in Jdev 10.1.3)
    Bye,
    Christophe

  • Using "Oracle Positional" as Binding Style  for VO

    Hi,
    I have create a VO using Binding Style as "Oracle Positional". The query I have given as..
    "select <All Column names> from Emp where deptNo = :1"
    I have drag and drop the datacontrol related to this VO on JSP page.
    Now the main issue is, "How to pass the default value for where condition when the page loads"?
    can I add some thing in PageDef file to pass this data.
    Thanks...
    Sree

    Two options:
    1. You can define the default value at the view object layer in the binding parameter section.
    2. If this is page specific then you can define it in the pagedef.xml file - look for the variableUsage tag under the executables section and set the DefaultValue property.

  • Webservice binding problem

    Hi,
    I created a webservice. In SOAMANAGER configured service. In overview tab, I selected my configured service and clicked on "Opnn WSDL document for selected binding". But its not calling any other screen. And I tried to test the webservice by clicking on "Open Web Service navigator for selected binding". Its not connecting WSNavigator. What is the problem here? Suggest me how to solve it.
    Thanks & Regards,
    Dhanunjaya Reddy

    Hi,
    Try applying SAP Note 1263112.
    Find the below link which will be helpful as this can be one of the reasons:
    soamanager referencing wrong port number in wsdl document
    Thanks
    Dhwani

  • Webservices: returning xml document to client

    Can anyone please help me to the following problem.
    1. I have a java bean which i publish as webservice. I want to return an xml document on request from client(for time being my client is normal java client). when i call getDoc() from client i get classload exception. can anyone explain me why?
    public org.w3c.dom.Document getDoc() throws java.rmi.RemoteException {
    Document document = null;
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File("C:\\data\\RND\\XmlParser\\XmlParser\\src\\xmlparser\\employer.xml"));
    catch (Exception ex) {
    return document;
    2. if i have to send a xml file to clinet on request using web services(i assume i cant return an document as above), is it feasible(my xml file is a transaction file) to send a xml file as string?
    3. how to transfer a xml file into a string?

    I'm almost sure that the error is because the Document class is not supported by JAX-RPC (see page 384 of the Java Web Services Tutorial).
    Try sending your XML as a String.
    This code may help you to transform between XML and String and viceversa:
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    public static Document toXmlDocument(String xml) throws IOException, SAXException, ParserConfigurationException
    StringReader reader = new StringReader(xml);
    InputSource source = new InputSource(reader);
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document xmlDoc = builder.parse(source);
    return ( xmlDoc );
    public static String toXmlString(Node node) throws TransformerConfigurationException, TransformerException
    StringWriter writer = new StringWriter();
    DOMSource source = new DOMSource(node);
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer();
    StreamResult result = new StreamResult(writer);
    transformer.transform(source,result);
    return ( writer.toString() );
    }

  • Binding Styles in Actionscript

    Friends,
    I have a Actionscript component which ofcourse is completely
    developed in Actionscript ... no mxml.
    I need to bind the some of the styles like gutterLeft etc to
    variables. How would I do it?
    BindingUtils.bindProperty(myChartObject, "gutterLeft", this,
    "MyVariable); ... will not work.

    "flexisawesome" <[email protected]> wrote in
    message
    news:gje2jh$95p$[email protected]..
    > Amy,
    > Thanks for your response but it dosent help. I dont
    think I expressed my
    > question very well. Let me try again.
    >
    > I have a Actionscript class that extends UIComponent and
    I am trying to
    > add
    > chart objects to it. Here is my code that should explain
    >
    > public class MyCharts extends UIComponent {
    > private var lineChart:LineChart;
    > private var someDataProvider:ArrayCollection = new
    > ArrayCollection([1,2,3]);
    > public var dynamicGutterLeft:int = 25;
    >
    > override protected createChildren():void {
    > lineChart = new LineChart();
    > lineChart.dataProvider = someDataProvider
    > //now I need to bind a style to a variable
    > BindingUtils.BindProperty(lineChart, "gutterLeft", this,
    > "dynamicGutterLeft");
    > //The above line will give an error because lineChart
    does not have a
    > property called "gutterLeft"
    > //question is how do I bind. This is a simple example to
    explain my
    > problem.
    > //I understand that I could have get/set for
    "dynamicGutterLeft" and
    > in
    > the set, I could do a setStyle.
    > //but I really want to bind it.
    > }
    >
    >
    > }
    >
    You can want all you want, but you can't force Flex to do
    something in a way
    that it isn't interested in doing it. When I was in college,
    one of my guy
    friends told me this story. He was out with some female
    friends of ours and
    the same guy kept asking one of them to dance. She kept
    saying no, and the
    guy finally said "But I really _want_ to dance with you. My
    friend stepped
    in and said "Yeah. We tend to want things."
    The only way to change a style is to call setStyle.
    http://livedocs.adobe.com/flex/3/html/databinding_9.html.
    HTH;
    Amy

  • Anyone know how to print a booklet style document?

    i am trying to print a 4 page ID document on ledger paper  but i cannot get the orientation right i basically want one ledger sheet of paper folded over like a book
    can someone tell me how to set this up?

    It could be that your printer doesn't play nice with InDesign's booklet feature. We have a bizhub, and there is no combination of settings from the InDesign booklet print that will make the orientation come out right. Fortunately, the bizhub has a booklet feature in its printer driver, so I use that instead.

  • Wsdl2service and document style

    Hello everybody.
    This is very urgent so any help will be really appreciated.
    I have a WSDL which uses document/literal style/encoding. I am running wsdl2service on it to generate java classes, and then proceeding successfully to generate and deploy a web service. The weblogic test page also works successfully.
    But when I look at the SOAP on-the-wire message, it is not document style SOAP compliant, for example, for the operation CreateNewAccount, that takes in the schema Customer.xsd, I get the following message :
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://www.schema.com/Bank">
         <SOAP-ENV:Body>
              <m:CreateNewAccount xmlns:m="http://www.telcordia.com/TestWebServices/Bank.wsdl">
                   <m0:Name></m0:Name>
                   <m0:SSN></m0:SSN>
                   <m0:Balance>0</m0:Balance>
                   <m0:Address>
                        <m0:Number></m0:Number>
                        <m0:Street></m0:Street>
                        <m0:State></m0:State>
                        <m0:Zip></m0:Zip>
                   </m0:Address>
              </m:CreateNewAccount>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The way I understand, if this were document styled web-service, the operation name in above should be replaced by Customer.xsd root element name. (Pls see the attached WSDL).
    I tried the same WSDL with the Systinet server, and it produced a SOAP message that I was expecting.
    If I changed this WSDL to rpc mode, the CreateNewAccount node is followed by the Customer node, which is fine.
    So my question is, is this a WLS 81 SP2 bug, or am I doing something wrong or missing something?
    The WSDL :
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns:tns="http://www.telcordia.com/TestWebServices/Bank.wsdl" xmlns:ws="http://www.telcordia.com/TestWebServices/Bank.wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:sch="http://www.schema.com/Bank" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.telcordia.com/TestWebServices/Bank.wsdl">
         <import namespace="http://www.schema.com/Bank" location="Customer.xsd"/>
         <import namespace="http://www.schema.com/Bank" location="Ack.xsd"/>
         <types>
              <xs:schema xmlns:tns="http://www.telcordia.com/TestWebServices/Bank.wsdl"/>
         </types>
         <message name="CreateNewAccountRequest">
              <part name="body" element="sch:Customer"/>
         </message>
         <message name="CreateNewAccountResponse">
              <part name="body" element="sch:Ack"/>
         </message>
         <portType name="CreateNewAccountPortType">
              <operation name="CreateNewAccount">
                   <input message="tns:CreateNewAccountRequest"/>
                   <output message="tns:CreateNewAccountResponse"/>
              </operation>
         </portType>
         <binding name="CreateNewAccountBinding" type="tns:CreateNewAccountPortType">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="CreateNewAccount">
                   <input>
                        <soap:body parts="body" use="literal"/>
                   </input>
                   <output>
                        <soap:body parts="body" use="literal"/>
                   </output>
              </operation>
         </binding>
         <service name="AccountService">
              <port name="ws:CreateNewAccountPort" binding="tns:CreateNewAccountBinding">
                   <soap:address location="http://taste.mk.telcordia.com:45000/TWS/NewAccountRequest"/>
              </port>
         </service>
    </definitions>
    =======================================================
    The schemas :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.schema.com/Bank" targetNamespace="http://www.schema.com/Bank" elementFormDefault="qualified">
         <xsd:element name="Customer">
              <xsd:complexType>
                   <xsd:all>
                        <xsd:element name="Name"/>
                        <xsd:element name="SSN"/>
                        <xsd:element name="Balance" type="xsd:integer"/>
                        <xsd:element name="Address">
                             <xsd:complexType>
                                  <xsd:all>
                                       <xsd:element name="Number"/>
                                       <xsd:element name="Street"/>
                                       <xsd:element name="State"/>
                                       <xsd:element name="Zip"/>
                                  </xsd:all>
                             </xsd:complexType>
                        </xsd:element>
                   </xsd:all>
              </xsd:complexType>
         </xsd:element>
    </xsd:schema>
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.schema.com/Bank" targetNamespace="http://www.schema.com/Bank" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xsd:element name="Ack">
              <xsd:complexType>
                   <xsd:all>
                        <xsd:element name="SSN"/>
                        <xsd:element name="AccountNumber"/>
                   </xsd:all>
              </xsd:complexType>
         </xsd:element>
    </xsd:schema>

    The generated web-services.xml from wsdl2service can have either style="rpc" or
    style="document". And in order to accomodate doc/lit operations that have multiple
    params you would need to edit the web-services.xml to have style="documentwrapped".
    Regards
    Shridhar
    Laxman Siyani <[email protected]> wrote:
    Hi,
    I have been using the autotype and wsdl2service ant tasks to generate
    firstly a complex data type from the .xsd, associated with a .WSDL.
    Then I use the wsdl2service to generate a Interface class which I implement.
    When I deploy this and try to use it from the test page in the Console,
    I get an error in the Weblogic.log:
    ERROR: Backend components for Document style webservice can only accept
    methods with one input parameter.
    Does anyone know how I can get wsdl2service to generate documentwrapped
    webservice.xml.
    Many thanks,
    Laxman

  • JAXRPC  Client for document literal Webservice - ClassCastException

    Hi...
    I am consuming one document literal webservice in AquaLogicService Bus which is returning complex type object. I have created jax-rpc client (generated stubs) to consume that ALSB service. I am able to send the request and service also generating the SOAP response . but I am getting following exception when running client.
    java.lang.ClassCastException: org.apache.axis.Message
         at com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231)
         at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
         at grpPolicy.GrpPolSP_Stub.queryByExample_HI(GrpPolSP_Stub.java:69)
         at grpPolicy.PolicyClientStubs.main(PolicyClientStubs.java:22)
    Here is my client:
    try
                   Request inObject = new Request();
                   Request outObject = new Request();
                   PolicyData pData = new PolicyData();
                   pData.setGroupName("Pharmaceutical");
                   pData.setPolicyNumber("1");
                   inObject.setPolicyData(pData);
                   Group_spcPolicy_spcInbound service = new Group_spcPolicy_spcInbound_Impl();
                   GrpPolSP_Stub stub = (GrpPolSP_Stub) service.getGrpPolSP();
                   outObject = (Request) stub.queryByExample_HI(inObject);
                   System.out.println(outObject.getPolicyData().getGroupName());
              catch(Exception e)
                   e.printStackTrace();
    Below I have pasted my WSDL:
    <?xml version="1.0" encoding="utf-8"?>
    <s0:definitions targetNamespace="http://test.com/asi/" xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://test.com/asi/" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
    <s0:types>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.test.com/xml/Request" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://test.com/asi/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsdLocal1="http://www.test.com/xml/Request">
    <xsd:annotation>
    <xsd:documentation>Test XSD Generation</xsd:documentation>
    </xsd:annotation>
    <xsd:element name="ListOfRequest" type="xsdLocal1:ListOfRequest"/>
    <xsd:complexType name="ListOfRequestTopElmt">
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="1" name="ListOfRequest" type="xsdLocal1:ListOfRequest"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ListOfRequest">
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="1" name="PolicyData" type="xsdLocal1:PolicyData"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="PolicyData">
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="0" name="EffectiveDate" type="xsd:string"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="EndDate" type="xsd:string"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="GroupName" type="xsdLocal1:string100"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="PolicyNumber" type="xsdLocal1:string100"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="State" type="xsdLocal1:string10"/>
    <xsd:element maxOccurs="1" minOccurs="0" name="Type" type="xsdLocal1:string30"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:simpleType name="string10">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="10"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string30">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="30"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string100">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="100"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string20">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="20"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://test.com/asi/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://test.com/asi/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsdLocal1="http://www.test.com/xml/Request">
    <xsd:import namespace="http://www.test.com/xml/Request"/>
    <xsd:element name="QueryByExample_HI_Input">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="xsdLocal1:ListOfRequest"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="QueryByExample_HI_Output">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="xsdLocal1:ListOfRequest"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </s0:types>
    <s0:message name="QueryByExample_HI_Input">
    <s0:part element="s1:QueryByExample_HI_Input" name="QueryByExample_HI_Input"/>
    </s0:message>
    <s0:message name="QueryByExample_HI_Output">
    <s0:part element="s1:QueryByExample_HI_Output" name="QueryByExample_HI_Output"/>
    </s0:message>
    <s0:portType name="GrpPolSP">
    <s0:operation name="QueryByExample_HI">
    <s0:input message="s1:QueryByExample_HI_Input"/>
    <s0:output message="s1:QueryByExample_HI_Output"/>
    </s0:operation>
    </s0:portType>
    <s0:binding name="GrpPolSP" type="s1:GrpPolSP">
    <s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <s0:operation name="QueryByExample_HI">
    <s2:operation soapAction="document/http://test.com/asi/:QueryByExample_HI"/>
    <s0:input>
    <s2:body use="literal"/>
    </s0:input>
    <s0:output>
    <s2:body use="literal"/>
    </s0:output>
    </s0:operation>
    </s0:binding>
    <s0:service name="Group_spcPolicy_spcInbound">
    <s0:port binding="s1:GrpPolSP" name="GrpPolSP">
    <s2:address location="http://localhost:7021/POC/Service/GroupPolicy"/>
    </s0:port>
    </s0:service>
    </s0:definitions>

    Hi,
    Are you talking about uisng WSIF invocation from ESB or BPEL? I am also trying to explore the possibility of invoking a service via HTTP binding available from WSIF providers. I know we can do this in BPEL. Wondering about how to do this in ESB.
    Regards,
    Rajesh

Maybe you are looking for