Complex Types Array in webservices

How can i invoke the generated Codec for one of my complex type array to serialize and get the xml data..
I am supposed to store the object info in database as xml. I cannot use regular xml encoding schemas due to limitations.
Thanks in Advance
Venkat

There are no public API for using the generated codec. Check out
if XMLBeans will be of any help:
http://xml.apache.org/xmlbeans/
Regards,
-manoj
http://manojc.com
"Venkat Addanki" <[email protected]> wrote in message
news:40d71639$1@mktnews1...
How can i invoke the generated Codec for one of my complex type array toserialize and get the xml data..
>
I am supposed to store the object info in database as xml. I cannot useregular xml encoding schemas due to limitations.
>
Thanks in Advance
Venkat

Similar Messages

  • Complex types arrays in webservices using custom codec

    In WLS8.1, I use the arrays serializing classes generated by the "servicegen" task,
    for the arrays of a complex type, and I register to the TypeMapping registry
    the complex type specifying as serializer/deserializer the custom codec that I
    developed. (The custom codec extends the AbstractCodec class)
    The problem occurs when I try to execute a service that has like return type an
    array of my complex type. In fact the response envelope is incorrectly built,
    containing before the tag result(that includes at his turn, the serialized array)
    once again the array serialized.
    So at the parsing time of the envelope, the following error occurs:
    … But was not able to find a Part that is registered with this Message which corresponds
    to this SOAPElement. The name of the element should be one of these[simpleTypeBDTs]
    at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:445)
    at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:74)
    at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:125)
    at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:513)
    at weblogic.webservice.server.Dispatcher.process(Dispatcher.java:150)
    at weblogic.webservice.server.Dispatcher.doDispatch(Dispatcher.java:125)
    at weblogic.webservice.server.Dispatcher.dispatch(Dispatcher.java:74)
    at weblogic.webservice.server.WebServiceManager.dispatch(WebServiceManager.java:98)
    at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebServiceServlet.java:274)
    at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:393)
    at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServlet.java:244)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6291)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
    java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: Exception
    during processing: javax.xml.soap.SOAPException: Found SOAPElement
    that seems to be normally because the encountered tag is not the result tag like
    expected, but the starting tag of the first element of the resulted array.
    It’s the correct way, the way I used? For my complex type is imperative to use
    a custom codec, because my complex types are the nested complex types.

    I opened a case to bea support, (case 426018 ) but I didn't obtain the solution
    till now.
    If you can access the case at the support.bea.com site, it contains a simple
    test case explaining my problem.
    regards,
    mihaela
    "manoj cheenath" <[email protected]> wrote:
    In fact the response envelope is incorrectly built,
    containing before the tag result(that includes at his turn, the serializedarray)
    once again the array serialized.I suspect this is due to a bug in 8.1 and it is fixed since. Please
    contact support for a patch.
    For my complex type is imperative to use
    a custom codec, because my complex types are the nested complex types.WLS can handle nested complex types. You need not write
    custome codec to handle this case.
    Regards,
    -manoj
    http://manojc.com
    "miki tirnacop" <[email protected]> wrote in message
    news:[email protected]...
    In WLS8.1, I use the arrays serializing classes generated by the"servicegen" task,
    for the arrays of a complex type, and I register to the TypeMappingregistry
    the complex type specifying as serializer/deserializer the custom codecthat I
    developed. (The custom codec extends the AbstractCodec class)
    The problem occurs when I try to execute a service that has like returntype an
    array of my complex type. In fact the response envelope is incorrectlybuilt,
    containing before the tag result(that includes at his turn, the serializedarray)
    once again the array serialized.
    So at the parsing time of the envelope, the following error occurs:
    . But was not able to find a Part that is registered with this Messagewhich corresponds
    to this SOAPElement. The name of the element should be one ofthese[simpleTypeBDTs]
    atweblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:445)
    atweblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.j
    ava:74)
    atweblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.jav
    a:125)
    atweblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:513)
    at weblogic.webservice.server.Dispatcher.process(Dispatcher.java:150)
    atweblogic.webservice.server.Dispatcher.doDispatch(Dispatcher.java:125)
    at weblogic.webservice.server.Dispatcher.dispatch(Dispatcher.java:74)
    atweblogic.webservice.server.WebServiceManager.dispatch(WebServiceManager.java
    :98)
    atweblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebSer
    viceServlet.java:274)
    atweblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:393)
    atweblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServle
    t.java:244)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:1053)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :387)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :305)
    atweblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
    ebAppServletContext.java:6291)
    atweblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:317)
    atweblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
    java.rmi.RemoteException: SOAPFault:javax.xml.rpc.soap.SOAPFaultException: Exception
    during processing: javax.xml.soap.SOAPException: Found SOAPElement
    that seems to be normally because the encountered tag is not the resulttag like
    expected, but the starting tag of the first element of the resultedarray.
    It's the correct way, the way I used? For my complex type is imperativeto
    use
    a custom codec, because my complex types are the nested complex types.

  • URGENT: Problem sending array of complex type data to webservice.

    Hi,
    I am writing an application in WebDynpo which needs to call External web service. This service has many complex data types. The function which I am trying to access needs some Complex data type array. When i checked the SOAP request i found that the namespace for the array type is getting blank values. Because of which SOAP response is giving exception.
    The SOAP request is as below. For the <maker> which is an array ,the xmlns:tns='' is generated.
    <mapImageOptions xsi:type='tns:MapImageOptions' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.glue.v2.mapimage/'>
    <dataSource xsi:type='xs:string'>GDT.Streets.US</dataSource>
    <mapImageSize xsi:type='tns:MapImageSize'><width xsi:type='xs:int'>380</width><height xsi:type='xs:int'>500</height></mapImageSize>
    <mapImageFormat xsi:type='xs:string'>gif</mapImageFormat>
    <backgroundColor xsi:type='xs:string'>255,255,255</backgroundColor>
    <outputCoordSys xsi:type='tns:CoordinateSystem' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.common.v2.geom/'>
    <projection xsi:type='xs:string'>4269</projection>
    <datumTransformation xsi:type='xs:string'>dx</datumTransformation>
    </outputCoordSys>
    <drawScaleBar xsi:type='xs:boolean'>false</drawScaleBar>
    <scaleBarPixelLocation xsi:nil='true' xsi:type='tns:PixelCoord'></scaleBarPixelLocation>
    <returnLegend xsi:type='xs:boolean'>false</returnLegend>
    <markers ns2:arrayType='tns:MarkerDescription[1]' xmlns:tns='' xmlns:ns2='http://schemas.xmlsoap.org/soap/encoding/'>
    <item xsi:type='tns:MarkerDescription'><name xsi:type='xs:string'></name>
    <iconDataSource xsi:type='xs:string'></iconDataSource><color xsi:type='xs:string'></color>
    <label xsi:type='xs:string'></label>
    <labelDescription xsi:nil='true' xsi:type='tns:LabelDescription'>
    </labelDescription><location xsi:type='tns:Point' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.common.v2.geom/'>
    <x xsi:type='xs:double'>33.67</x><y xsi:type='xs:double'>39.44</y>
    <coordinateSystem xsi:type='tns:CoordinateSystem'>
    <projection xsi:type='xs:string'>4269</projection>
    <datumTransformation xsi:type='xs:string'>dx</datumTransformation>
    </coordinateSystem></location></item>
    </markers><lines xsi:nil='true'>
    </lines><polygons xsi:nil='true'></polygons><circles xsi:nil='true'></circles><displayLayers xsi:nil='true'></displayLayers>
    </mapImageOptions>
    Another problem:
    If the webservice is having overloaded methods , it is generating error for the second overloaded method.The stub file itself contains statment as follow:
    Response = new();
    can anyone guide me on this?
    Thanks,
    Mital.

    I am having this issue as well.
    From:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/ce993b45cb0a85e10000000a1553f6/frameset.htm
    I see that:
    The WSDL document in rpc-style format must also not use any soapenc:Array types; these are often used in SOAP code in documents with this format. soapenc:Array uses the tag <xsd:any>, which the Integration Builder editors or proxy generation either ignore or do not support.
    You can replace soapenc:Array types with an equivalent <sequence>; see the WS-I  example under http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16556272.
    They give an example of what to use instead.
    Of course I have been given a WSDL that has a message I need to map to that uses the enc:Array.
    Has anyone else had this issue?  I need to map to a SOAP message to send to an external party.  I don't know what they are willing to change to support what I can do.  I changed the WSDL to use a sequence as below just to pull it in for now.
    Thanks,
    Eric

  • How to pass values to XML complex type of a Webservice using PL/SQL

    HI,
    I need to call a web service from PL/SQL that has an complex type element. That complex type element has 4 child elements each of integer type.
    I want to pass values for this complex type using SOAP_API.add_parameter but I can't understand how to pass the values.
    <xsd:element name="getBestFit">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1" name="circleId" type="xsd:string"/>
                        <xsd:element maxOccurs="1" minOccurs="1" name="usage" type="Q1:UsageInfoType"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    <complexType name="UsageInfoType">
         <sequence>
              <element maxOccurs="1" minOccurs="1" name="a1" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a2" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a3" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a4" type="int"/>
         </sequence>
    </complexType>
    Please help me in getting a solution here.
    Thanks in advance.

    Have you tried doing a google search on "SOAP_API.add_parameter" to see what comes back? I see a lot of hits come back so hopefully one of those will help you. I've never used soap_api as I used utl_http to make WS calls. This required me to build the SOAP message (aka XML of a specific nature) by hand and then pass it to the WS using utl_http. How this approach is done via SOAP_API, I can't say.

  • Mapping descrete values to childs of a complex type array

    Hi all,
    I have the following flat XML file with descrete values as source:
    <MaterialRequest_MT>
      <number><b>number1</b></number>
      <shortdesc><b>shortdesc1</b></shortdesc>
      <projectname><b>projectname1</b></projectname>
    </MaterialRequest_MT>
    My problem is how to map this file to the following destination file where the single values of the source file are values of a child element in a list of complex elements:
    <ns0:query xmlns:ns0="http://QueryService">
            <ns0:attributes>
              <ns0:item>
                <ns0:key>
                  <ns0:system>MP</ns0:system>
                  <ns0:name>PartNumber</ns0:name>
                </ns0:key>
                <ns0:value><b>number1</b></ns0:value>
              </ns0:item>
              <ns0:item>
                <ns0:key>
                  <ns0:system>MP</ns0:system>
                  <ns0:name>Description</ns0:name>
                </ns0:key>
                <ns0:value><b>shortdesc1</b></ns0:value>
              </ns0:item>
              <ns0:item>
                <ns0:key>
                  <ns0:system>MP</ns0:system>
                  <ns0:name>Project</ns0:name>
                </ns0:key>
                <ns0:value><b>projectname1</b></ns0:value>
              </ns0:item>
            </ns0:attributes>
    </ns0:query>
    As you see I don't have a source array over which to iterate. This makes it impossible to me to map the source values to the destination items.
    Any help is very appreciated!
    Thanks!
    Denis

    Hi
    <b>Mapping for item node:</b>
        Create a user defined function with 3 input parameters for number,shortdesc,projectname. In the user defined function check whether each input value exists or not.if the input value exists add the code 'result.addValue("")'.if the 3 input values exist then 3 item nodes will be created.
    <b>Mapping for elements</b>
             Create another user defined function with 3 parameter.take the 3 input values same as the above function. Check whether parameter a value exists in the element and write  <b>result.addValue(a[0]);</b>Do similarly for b and c parameters. After defining this function add standard node function 'splitbyvalue' and assign to the target.
       USedefined function---->splitbyvalue--
    >value.
    I guess this solution is a bit complex.....hope it works
    regards
    Suneel
    Message was edited by: Suneel
    Message was edited by: Suneel

  • Help with BPEL - copy values inside of complex type array ???

    I have a jirasoapservice-v2.wsdl with:
    <complexType name="RemoteIssue">
    <complexContent>
    <extension base="tns1:AbstractRemoteEntity">
    <sequence>
    <element name="customFieldValues" nillable="true" type="impl:ArrayOf_tns1_RemoteCustomFieldValue"/>
    <complexType name="ArrayOf_tns1_RemoteCustomFieldValue">
    <complexContent>
    <restriction base="soapenc:Array">
    <attribute ref="soapenc:arrayType"> wsdl:arrayType="tns1:RemoteCustomFieldValue[]"/>
    </restriction>
    </complexContent>
    </complexType>
    <complexType name="RemoteCustomFieldValue">
    <sequence>
    <element name="customfieldId" nillable="true" type="xsd:string"/>
    <element name="key" nillable="true" type="xsd:string"/>
    <element name="values" nillable="true" type="impl:ArrayOf_xsd_string"/>
    </sequence>
    </complexType>
    And in BPEL I'm trying this code:
    <?xml version="1.0" encoding="UTF-8"?>
    <process
    name="CosimaJiraProcess"
    targetNamespace="http://enterprise.netbeans.org/bpel/BpelModuleCosimaJira/CosimaJiraProcess"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace"
    xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"
    xmlns:sxat="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Attachment"
    xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling"
    xmlns:tns="http://enterprise.netbeans.org/bpel/BpelModuleCosimaJira/CosimaJiraProcess" xmlns:sxed2="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor2" xmlns:ns0="un:CosimaJira:JiraObject" xmlns:ns1="un:CosimaJira:CosimaObject" xmlns:impl="http://localhost/rpc/soap/jirasoapservice-v2" xmlns:ns2="http://beans.soap.rpc.jira.atlassian.com" xmlns:ns3="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:sxxf="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions">
    <import namespace="http://enterprise.netbeans.org/bpel/jirasoapservice-v2Wrapper" location="jirasoapservice-v2Wrapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
    <import namespace="http://localhost/rpc/soap/jirasoapservice-v2" location="binding/jirasoapservice-v2.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
    <import namespace="http://j2ee.netbeans.org/wsdl/BpelModuleCosimaJira/JMSCosimaJiraWSDL" location="binding/JMSCosimaJiraWSDL.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
    <partnerLinks>
    <partnerLink name="PartnerLink1" xmlns:tns="http://j2ee.netbeans.org/wsdl/BpelModuleCosimaJira/JMSCosimaJiraWSDL" partnerLinkType="tns:JMSCosimaJiraWSDL" myRole="JMSInPortTypeRole"/>
    <partnerLink name="plJira" xmlns:tns="http://enterprise.netbeans.org/bpel/jirasoapservice-v2Wrapper" partnerLinkType="tns:JiraSoapServiceLinkType" partnerRole="JiraSoapServiceRole"/>
    </partnerLinks>
    <variables>
    <variable name="JMSInOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/BpelModuleCosimaJira/JMSCosimaJiraWSDL" messageType="tns:JMSInputMessage"/>
    <variable name="Token" messageType="impl:loginResponse"/>
    <variable name="LoginIn" messageType="impl:loginRequest"/>
    <variable name="newIssue" type="ns2:RemoteIssue"/>
    <variable name="CreateIssueOut" xmlns:impl="http://localhost/rpc/soap/jirasoapservice-v2" messageType="impl:createIssueResponse"/>
    <variable name="CreateIssueIn" xmlns:impl="http://localhost/rpc/soap/jirasoapservice-v2" messageType="impl:createIssueRequest"/>
    </variables>
    <sequence>
    <receive name="Receive1" createInstance="yes" partnerLink="PartnerLink1" operation="JMSInOperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/BpelModuleCosimaJira/JMSCosimaJiraWSDL" portType="tns:JMSInPortType" variable="JMSInOperationIn"/>
    <scope name="Scope1">
    <variables>
    <variable name="cusField1" type="ns2:RemoteCustomFieldValue"/>
    </variables>
    <sequence name="Sequence1">
    <assign name="AssignNewIssue">
    <copy>
    <from>'probe'</from>
    <to>$cusField1/customfieldId</to>
    </copy>
    <copy>
    <from>'summary'</from>
    <to>$newIssue/summary</to>
    </copy>
    <copy>
    <from variable="cusField1"/>
    <to>$newIssue/customFieldValues[1]**</to>
    </copy>
    </assign>
    </sequence>
    </scope>
    <assign name="LoginAssign">
    <copy>
    <from>'test'</from>
    <to variable="LoginIn" part="in0"/>
    </copy>
    <copy>
    <from>'test'</from>
    <to variable="LoginIn" part="in1"/>
    </copy>
    </assign>
    <invoke name="loginJira" partnerLink="plJira" operation="login" portType="impl:JiraSoapService" inputVariable="LoginIn" outputVariable="Token"/>
    <assign name="IssueAssign">
    <copy>
    <from variable="newIssue"/>
    <to variable="CreateIssueIn" part="in1"/>
    </copy>
    <copy>
    <from variable="Token" part="loginReturn"/>
    <to variable="CreateIssueIn" part="in0"/>
    </copy>
    </assign>
    <invoke name="createIssue" partnerLink="plJira" operation="createIssue" xmlns:impl="http://localhost/rpc/soap/jirasoapservice-v2" portType="impl:JiraSoapService" inputVariable="CreateIssueIn" outputVariable="CreateIssueOut"/>
    </sequence>
    </process>
    None of the 3 ways work:
    <copy>
    <from variable="cusField1"/>
    <to>$newIssue/customFieldValues[1]/ns2:RemoteCustomFieldValue</to>
    </copy>
    <copy>
    <from variable="cusField1"/>
    <to>$newIssue/customFieldValues/impl:RemoteCustomFieldValue[1]</to>
    </copy>
    <copy>
    <from variable="cusField1"/>
    <to>$newIssue/customFieldValues[1]*</to>
    </copy>
    Any ideas, advice or suggestions ???
    Thanks,

    Hi,
    My requirement is to retrieve those task which satisfying some input criteria. and that input criteria are in payload attribute of task.
    we can use ITaskQueryService API, for retrieving task list, but I am not able to see any function through which I can find my task based on payload attribute,
    Lets take a example
    I created a task with atribute functionID="ABC" (payload attribute). now i want to query the task list which have functionID attribute value "ABC".
    for this I have found some flex fields are there, but even not sure what flex fields are.
    still trying for the same.

  • CF10 is evaluating strings with comma's as complex types (Array), formerly they were just Strings

    Coldfusion 10's behaviour appears to have changed in the evaluation of strings with commas.
    Example:
    FORM.IDS = 123456, 654321, 789101  (Form Submission)
    <cfset fieldname="IDS" />
    <cfset test1 = FORM[fieldname] />
    <cfset test2 = evalute("FORM.#fieldname#") />
    In Coldfusion 9 the value of test1 and test2 is reported as "123456, 654321, 789101".
    In Coldfusion 10 the value of test1 and test2 is reported as an array. "Array (3)".
    Is this expected behaviour?  This is jacking up an application we are trying to upgrade and did not expect this one.  Any help will be much appreciated.
    Cheers
    Lee 

    ldavis101 wrote:
    Coldfusion 10's behaviour appears to have changed in the evaluation of strings with commas.
    Example:
    FORM.IDS = 123456, 654321, 789101  (Form Submission)
    <cfset fieldname="IDS" />
    <cfset test1 = FORM[fieldname] />
    <cfset test2 = evaluate("FORM.#fieldname#") /> [BKBK: typo corrected]
    In Coldfusion 9 the value of test1 and test2 is reported as "123456, 654321, 789101".
    In Coldfusion 10 the value of test1 and test2 is reported as an array. "Array (3)".
    Is this expected behaviour? 
    No, that is unexpected. Please report it as a bug.

  • Complex attributes mapping with webservice

    I have an entity service which contains a complex attribute.
    I have imported a webservice and have made the mappings between the attributes of operation from webservice to entity service attributes in its operation.
    When i test my entity service, though i am able to retrive the data for simple attributes from the web service, i am unable to get values for COMPLEX attribute.
    Structure of the complex attribute is in sync with the complex structure in webservice.
    Note : NWDS Version: 7.0.09 and
    J2EE server version : 7.00 SP10
    can version difference be the problem ?
    Any pointers to this problem will be appreciated.
    Regards
    Navin

    Actually the service browser doesnt show any error message.
    It fetches all other information except for the complex attributes.
    Note : In wsnavigator, i find only the "Key" and "Parent key" attributes for the complex type of the webservice, but other attributes within the complex type are not displayed.
    I referred to the following thread on SDN which is similar to my problem.
    URGENT: Problem returning Comlex Types from Web Services
    I wanted to cross verify Ivo Totev's  comments on the limitation of sneak preview edition in the above thread.

  • Complex types with single array type element, marshaling exception

    For our JAXRPC web service, we have a complex type, as follows:
    <xs:complexType name = "SomeFault">
    <xs:sequence>
    <xs:element name = "errorMessages" type="some:ErrorMessageWSType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    </xs:complexType>
    <xs:simpleType name = "ErrorMessageWSType">
    <xs:restriction base = "xs:NMTOKEN">
    <xs:enumeration value = "INVALID_1"/>
    <xs:enumeration value = "INVALID_2"/>
    <xs:enumeration value = "INVALID_3"/>
    </xs:restriction>
    </xs:simpleType>
    We are running into Marshaling exceptions on the server side when the response/fault complex type has a single array type field.
    weblogic.wsee.codec.CodecException: Failed to encode
    com.bea.xml.XmlException: failed to find a suitable binding type for use in marshalling object "[Lnamespace.type.ErrorMessageWSType;@693767e9".  using schema type: t=SomeFault@http://namespace/SOME/v1 java type:namespace.type.ErrorMessageWSType[]
    If I change SomeFault, by adding another element, the error goes away.
    <xs:complexType name = "SomeFault">
    <xs:sequence>
    <xs:element name = "errorMessages" type="some:ErrorMessageWSType" maxOccurs="unbounded" />
    <xs:element name = "dummyString" type="xsd:string" minOccurs="0" />
    </xs:sequence>
    </xs:complexType>
    Am I doing something wrong during the wsdlc code generation or is this a known issue?
    <wsdlc srcWsdl="${wsdl.dir}/${wsdl.file.name}"
    destJwsDir="${gen.src.dir}/gen-src-jar"
    destImplDir="${main.src.dir}"
    packageName="${package.prefix}" type="JAXRPC">

    Any luck with this? I am running into the same error. Apparently, this is not an issue with Java binding, but when invoking remote EJBs, we run into this. I am running 10.1.3.1 and the error is:
    <fault>
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>
    com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@e26dbf : Could not invoke 'getIdentityInfo'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </summary>
    </part>
    <part name="detail">
    <detail>
    org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </detail>
    </part>
    </bindingFault>
    </fault

  • Returning complex types with arrays (Java / EJB via WSIF)

    Hi all,
    I'm writing some WSIF bindings for existing EJBs, and I've struck a bit of a problem. Basically I've got complex types that contain arrays, and while instances of these types can be passed to the EJBs, return variables typed similarly cause the following fault:
    org.collaxa.thirdparty.apache.wsif.WSIFException: com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@1a372e0 : Could not invoke 'concatString'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ejbinterfacetest.StringReturnArray' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB.executeRequestResponseOperation(WSIFOperation_EJB.java:1305)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:431)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:416)
    The Java class StringReturnArray is a serializable JavaBean with one property, a String[] called strings. The corresponding complexType (that works when used as a method parameter type) is stringReturnArrayType:
    <complexType name="stringArrayType">
    <sequence>
    <element name="str" type="string" maxOccurs="unbounded" />
    </sequence>
    </complexType>
    <complexType name="stringReturnArrayType">
    <sequence>
    <element name="strings" type="tns:stringArrayType" />
    </sequence>
    </complexType>
    and I've type mapped in the binding with
    <format:typeMap typeName="typens:stringReturnArrayType" formatType="ejbinterfacetest.StringReturnArray" />
    Anyone know why this would be? Is there any way I can get more information out of BPEL or OC4J regarding the fault? (I've already turned the BPEL domain logging to All)
    Cheers,
    Chris.

    Any luck with this? I am running into the same error. Apparently, this is not an issue with Java binding, but when invoking remote EJBs, we run into this. I am running 10.1.3.1 and the error is:
    <fault>
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>
    com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@e26dbf : Could not invoke 'getIdentityInfo'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </summary>
    </part>
    <part name="detail">
    <detail>
    org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </detail>
    </part>
    </bindingFault>
    </fault

  • Soap encoded array of complex type, impossible to map?

    Hello,
    can anyone please tell me if the XI has problems (or is unable) to read from soap-encoded arrays of a complex type.
    As far as I know this is conform to SOAP 1.1
    We developed this webservice for a client, who says, he cannot map this kind of array in his XI.
    Would it be better to do it this way ?
    <complexType name="ActivityList">
      <sequence>
        <element name="ActivityEl" maxOccurs="unbounded" type="Activity"/>
      </sequence>
    </complexType>
    Excerpt of the WSDL:
        <wsdl:message name="getDataForPbnrResponse">
            <wsdl:part name="getDataForPbnrReturn" type="impl:ArrayOf_tns1_Activity"/>
        </wsdl:message>
            <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ipslsv01vm02:9080/axis/services/QEC-Service">
                <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
                <complexType name="ArrayOf_tns1_Activity">
                    <complexContent>
                        <restriction base="soapenc:Array">
                            <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Activity[]"/>
                        </restriction>
                    </complexContent>
                </complexType>
                <complexType name="ArrayOf_tns1_ActivityFeedback">
                    <complexContent>
                        <restriction base="soapenc:Array">
                            <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:ActivityFeedback[]"/>
                        </restriction>
                    </complexContent>
                </complexType>
            </schema>
    Part ot the response:
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
      <ns1:getDataForPbnrResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ipslsv01vm02:9080/axis/services/QEC-Service">
       <getDataForPbnrReturn xsi:type="soapenc:Array" soapenc:arrayType="ns3:Activity[7]" xmlns:ns2="http://www.w3.org/2002/12/soap-encoding" xmlns:ns3="urn:BeanService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <item href="#id0"/>
        <item href="#id1"/>
        <item href="#id2"/>
        <item href="#id3"/>
        <item href="#id4"/>
        <item href="#id5"/>
        <item href="#id6"/>
       </getDataForPbnrReturn>
      </ns1:getDataForPbnrResponse>
      <multiRef id="id5" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Activity" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns4="urn:BeanService">
       <FIN xsi:type="xsd:string">---</FIN>
       <VIN xsi:type="xsd:string"></VIN>
    cut -
       <ursache xsi:type="xsd:string"></ursache>
      </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>
    Thanks in advance!

    I am having this issue as well.
    From:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/ce993b45cb0a85e10000000a1553f6/frameset.htm
    I see that:
    The WSDL document in rpc-style format must also not use any soapenc:Array types; these are often used in SOAP code in documents with this format. soapenc:Array uses the tag <xsd:any>, which the Integration Builder editors or proxy generation either ignore or do not support.
    You can replace soapenc:Array types with an equivalent <sequence>; see the WS-I  example under http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16556272.
    They give an example of what to use instead.
    Of course I have been given a WSDL that has a message I need to map to that uses the enc:Array.
    Has anyone else had this issue?  I need to map to a SOAP message to send to an external party.  I don't know what they are willing to change to support what I can do.  I changed the WSDL to use a sequence as below just to pull it in for now.
    Thanks,
    Eric

  • BPM, webservices and complex types

    I have a WSDL wich has complext xml types, I create a webservice call in BPM. I get a SOAP fault string
    <?xml version="1.0" encoding="UTF-8" ?>
    <detail faultString="Unable to find a matching Operation for this remote invocation <ns1:createProduct xmlns:ns1="java:com.screwfix.xml.product">
         <ns1:description>From BPM</ns1:description>
    </ns1:createProduct>. Please check your operation name. " faultCode="Client">
    </detail>
    I can access the webservice externally but not through BPM. I can access webserivice without complex types, such as simple string....
    Looking at the error, it indicates that the soap client cannot process the request. Any ideas would be appreciated, we are using ALBPM 5.7
    Full exception :
    <?xml version="1.0" encoding="UTF-8" ?>
    <detail faultString="Unable to find a matching Operation for this remote invocation <ns1:createProduct xmlns:ns1="java:com.screwfix.xml.product">
         <ns1:description>From BPM</ns1:description>
    </ns1:createProduct>. Please check your operation name. " faultCode="Client">
    </detail>
    fuego.soaptype.SoapExecutionException: <?xml version="1.0" encoding="UTF-8" ?>
    <detail faultString="Unable to find a matching Operation for this remote invocation <ns1:createProduct xmlns:ns1="java:com.screwfix.xml.product">
         <ns1:description>From BPM</ns1:description>
    </ns1:createProduct>. Please check your operation name. " faultCode="Client">
    </detail>
         at fuego.soaptype.SoapCall.processRemoteException(SoapCall.java:531)
         at fuego.soaptype.SoapCall.invoke(SoapCall.java:292)
         at fuego.soaptype.SoapObject.invoke(SoapObject.java:272)
         at fuego.lang.Invokeable.invokeImpl(Invokeable.java:220)
         at fuego.lang.Invokeable.invoke(Invokeable.java:161)
         at fuego.compiler.Invoke$MethodCall.run(Invoke.java:1543)
         at fuego.compiler.Invoke.runCall(Invoke.java:710)
         at fuego.compiler.Invoke.run(Invoke.java:694)
         at fuego.compiler.Block.run(Block.java:317)
         at fuego.compiler.DoBlock.run(DoBlock.java:676)
         at fuego.compiler.Method.run(Method.java:1223)
         at fuego.compiler.Method$Adaptor.run(Method.java:1894)
         at fuego.compiler.FuegoInvokeable.invoke(FuegoInvokeable.java:426)
         at fuego.compiler.CodeRunner$DebuggerRunnable.runMethod(CodeRunner.java:756)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1478)
         at fuego.lang.JavaObject.invoke(JavaObject.java:185)
         at fuego.component.Message.process(Message.java:585)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:759)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:734)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:140)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:132)
         at fuego.compiler.DebuggerPrincipal.processBatch(DebuggerPrincipal.java:62)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:818)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:397)
    Edited by masoodmjan at 06/19/2007 9:01 AM

    I found out that the retrieve method accepts columnSet as a
    class and id as a class. These are not strings that you can pass
    into MSCRM 3.0. However, I have no idea how to create a .NET
    acceptable class and pass it in. If you figured this out, or if
    others have thoughts, I'd love to hear how you've gone about it.
    Thank you!

  • ****Urgent**** Webservice Complex Type Handling ****Urgent****

    Hi kglad, am junior flash developer trying out webservices.
    So i was trying out a webservice "https://www.suhrkamp.de/webservice/suhrkamp_ws.cfc?wsdl"
    where i call getNews("webservicechef","remote147suhrkamp",41722) method.But even before the
    method is executed on the server i get an error of "Type apachesoap:Document not resolvable".From more research av come
    to knw tht the problem is that the service returns a complex type of apachesoap:Document
    which flash doesnt seem to understand.So how will i solve this....?
    my source is shown here below
    import mx.services.*;
    bt_Enter.clickHandler = function() {
        trace("Show invocation..");
        var q:String = input.text;
        //used to trace the actions from the cleint..
        stockServiceLog = new Log(Log.VERBOSE);
        stockServiceLog.onLog = function(txt) {
            trace(txt);
            disp.text = txt;
        /*var fault = function (stat) {
        trace("in fault..,");
            if (stat.code == "WebServiceFault"){
                trace(stat.data.faultcode);
                trace(stat.data.faultstring);
                trace(stat.data.detail);
        //Instanciating the web service..
        var stockservice = new WebService("https://www.suhrkamp.de/webservice/suhrkamp_ws.cfc?wsdl", stockServiceLog);
        //stockservice.addEventListener("status", fault);
        stockResultObj = stockservice.getNews("webservicechef","remote147suhrkamp","41722");
        trace("Requested XML: "+stockResultObj.request+" from  request");
        //stockservice.onLoad = trace("loading");
        // the onResult function is called if the service is successful
        stockResultObj.onResult = function(result) {
            trace(" result ok..");
            display.text=result;
            trace(result);
            trace("RequestXML: "+stockResultObj.request);
            trace("ResponseXML: "+stockResultObj.response);
        stockResultObj.onFault = function(fault) {
            trace(" on error  ok..");
            // If there is any error such as the service not working, the onFault handler will be invoked.
            trace(fault.faultCode+","+fault.faultstring);
            disp.text += fault.faultCode+","+fault.faultstring;

    Hi Sampath,
    Please check SAP note 1004108. I think the issue you describe is one of the limitations described in this note.
    Regards,
       Jan

  • How to use Adaptive WebService Model with CAF WebService and Complex Type

    Hi All,
    I am trying to use the Adaptive Web Service Model and call a WebService generated by the CAF. The return type of the WebService is a Complex Type.. I receive an exception when trying to instantiate the Model Node.
    Does anybody know how to use the Adpative Web Service Model with CAF WebServices and Complex Types as return type?
    Help is appreciated..
    Thanks, Johannes

    Thanks Mukesh.
    It is not possible to apply the Service Controller Template on Enterprise Java Bean Models as described in the Document. When I try to aply the template on the EJB Model, NWDS says: Only Webservice Models and RFC Models are supported...???
    I did not find any information about how to return complex types in AWS.. in this document???
    Is there such information available? Has anybody ever done that? There must be a way to do that.. Is is the standard approach, isn't it...? Please help me out there.. I need to get this running..
    Thanks, Johannes

  • Complex Types in Webservices

    Hi,
    I'm trying to make a call to a web service method which takes a complex type as a parameter.
    I'm using an object of type Object and setting two properties of the object called name and body then passing the object as the parameter of the webservice method.  The problem that I'm seeing is that the name property doesn't seem to be getting set.  I'm using Wireshark to packet sniff the SOAP request Flex sends to the webservice and I never see the name property in the request (but I do see the body property every time).
    Please note that this is not a connectivity issue as I am able to successfully make several other methods which do not take parameters with complex types.
    Does anybody know what I need to do to get this name property to show up properly in the complex type?
    Here is my Flex code:
    </mx:Script>
    <![CDATA[
    public function init() : void {
         var mb : Object;
         mb = new Object();
         mb.name = "inputMsg";
         mb.body = "foo";
         service.setMessage.send(mb);
    ]]>
    </mx:Script>
    <mx:WebService
      id="service"
      result="onResult(event)"
      fault="onFault(event)"
      wsdl="http://FOOBAR:8282/EngineService/engine?wsdl">
      </mx:WebService>
    Here is the SOAP request I picked up in Wireshark:
    O@8qE2@g@t@F#H"P0<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <ns0:setMessage xmlns:ns0="http://isws.pervasive.com">
          <mb xsi:type="intf:Message" xmlns:intf="http://isws.pervasive.com/">
            <body xsi:type="xsd:string">foo</body>
          </mb>
        </ns0:setMessage>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Thanks,
    Dan

    user10455639 wrote:
    So I think you are right that I messed it up, So let me explain -
    Using JAXB -
    1. You can use Types annotation and Hence also specify what all your class can return. For example -
    public void saveAlert(Alert alert)
    so we can say using types something like -
    public void saveAlert(@Types({"com.businessobject.BalanceThreshold"}) Alert alert)
    indicating that your inout can also be a balanceThrshold object
    or something like -
    (@Types({"com.businessobject.BalanceThreshold"})
    public Alert getAlert()
    indicating that your ouput can also be a balanceThrshold object
    However with JAXB I get stuck with when the return type internally has a complext data type.
    using JAXWS-
    I donot know if there is a way to specify those extension as described above
    But you are right that the return type gets automatically taken care of with JAX-WS
    can you suggest similar notation to Types in JAXWS?
    On JAXB - I didnt understand your comment of "My suggestion is that you should try start from WSDL"
    Your comments are very helpful.
    thanksI assume that you mean JAX-RPC, not JAXB. According to link, @Types should only be used on WebMethod or the WebMethod parameter. So it wouldn't work if you specify it on complex data type.
    Start from WSDL is so called top down WebServices, it assumes that you have a WSDL as contract first, then you can generate the JWS from this WSDL.

Maybe you are looking for

  • "Preview Page in Browser" stopped working...

    Hi guys, First off, looking forward to seeing what's unveiled at Create Now Live on December, 11th! Anyway, here's the Muse bug that just cropped up yesterday as I was working on a niche one-pager site: when I tried "Preview Page in Browser," nothing

  • My iphone 4s will not connect to wifi

    I have tried everything that i've read online & nothing is working. Started 2 days ago switching on & off all by itself when it decided yesterday am it had had enough of wifi & since then nothing I do makes any difference. From turning on airplane mo

  • How to determine in an XML node exists in Coldfusion

    If I have XML that looks something like this: <manifest>     <state ID="20" name="State 2">         <person>john.black</person>     </state>     <state ID="30" name="State 2">         <person>bill.doe</person>         <group>Group2</group>     </stat

  • Deskjet 3054 not printing but scanner works

    Hello! I have a Deskjet 3054 per label on the printer, however, but the IP address says it's Deskjet 3050 All-in-One J610a. My computer is Mac 10.9.5. I've read through other posts and have updated all my software via Apple's Software Update. The sym

  • IPhone with two computers...sort of

    Right, I bought my iPhone 4 yesterday. I have a Macbook with OS X 10.4. I know this combination doesn't work. I obviously want to start using my iPhone, so is there a way of connecting my iPhone to my dads Windows PC just to get it registered and sor