WSDL, custom datatypes, fault element name issues

Hello all,
I am having a LOT of problems with BEAs webservices. I am posting
this here in the hope that someone can help me and tell me what I am
doing incorrectly. I am running
WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753
WebLogic XMLX Module 7.0 SP1 Mon Sep 9 22:54:41 PDT 2002 206753
Background:
My goal is to make my company's product web services aware. I take an
EJB, try to run it through the standard ant tasks and generate a web
services accessible EJB. Sounds pretty easy, but complex types seem
to make this quite difficult.
I have been able to create a web service accessible EJB (only since
7.0.1), but I am quite unhappy with the quality of what I am able to
produce.
I have a datatype which acts as a key, but it does not follow the
javabeans idiom - i.e. it does not have a default constructor or
accessor methods and I am not in the position to change it. I have
created a codec for this class which works and an xml schema (both by
hand). Its name is AgentKey. I have also had to use the autotyper to
create codecs and typemapping entries for java.util.Properties,
I can connect using the WebLogic classes and I am now trying to
interact using MS Excel and Apache's Axis as my test clients.
Issues:
My first question deals with generating a client. There seem to be
two ways to generate a client. Firstly via the <client> subtask of
<servicegen><service>, the second way via <clientgen> task. Since I
am using a custom data type (AgentKey) I have to manually insert the
AgentKey schema into the web-services.xml file generated by
servicegen. When I try to generate a client via the
servicegen/service/client task there is no opportunity for me to
insert this datatype schema information and I therefore get the
following messages (lots of them, but I'm only including one):
[servicegen] WARNINIG: Unable to find a javaType for the xmlType:['java:net.agentis.apml.runtime']:AgentKey.
Make sure that you have registered this xml type in the type mapping
[servicegen] Using SOAPElement instead
BTW: I am also receiving the same problem with java.util.Properties.
BTW: WARNING is misspelt
If I attempt to generate a client class via the <clientgen> task, I
need to supply either a wsdl or ear file as a parameter. I cannot
supply a wsdl file because I haven't deployed the EAR yet (and I don't
want to until the EAR has the client classes in it), and I can't
supply the EAR because I want the ear to include the client classes.
It is a bit of a catch 22 situation. Is there a solution I can't see?
NOTE: it would be very, very nice if you added a schemaMapping
attribute to the <servicegen/service> task so the web-services.xml
file didn't have to be manually hacked. Something similar to the
typemapping attribute already in the servicegen/service task would do
it.
My next problem deals with the validity of the WSDL. I am seeing that
the WSDL created has exceptions defined multiple times. I saw a
message from Manjo saying that it looked like a bug. I agree and
would like to get a copy of the patch. On a more significant note,
when is either SP2 or 7.1 due for release?
Another problem with the WSDL (once you have cleansed the multiple
exception messages) is that the fault elements of the
binding/operation elements require names and they don't have any. For
example, this is straight from the deployed EJB WSDL file:
<binding name="ExampleAgentPortSoapBinding" type="tns:ExampleAgentPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="serviceWithPrimitiveDatatypes">
<soap:operation soapAction="" style="rpc"/>
<input>
<soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
<fault>
<soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</fault>
</operation>
<operation ...
The schema definition at http://schemas.xmlsoap.org/wsdl/ says the
fault element require a name attribute:
<complexType name =" tBindingOperationFault">
<complexContent>
<extension base="wsdl:tExtensibleDocumented">
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
The name of the fault should be the same name as the fault in the
portType definition. In my example the name is "AgentisException" as
evidenced by this snippet:
<portType name="ExampleAgentPort">
<operation name="serviceWithPrimitiveDatatypes">
<input message="tns:serviceWithPrimitiveDatatypes"/>
<output message="tns:serviceWithPrimitiveDatatypesResponse"/>
<fault name="AgentisException" message="tns:AgentisException"/>
</operation>
Once these changes have been made then the WSDL will validate. Are
there plans to fix these bugs?
On a different note, when I try to interact with a method that uses a
custom data type, such as AgentKey, via the "WebLogic Webservice
standard testing home page" the custom data type without a default
constructor cannot be rendered correctly. For instance, the AgentKey
value is:
<!-- Do not know how to create a sample instance for this part due to the following
exception:java.lang.InstantiationException: net.agentis.apml.runtime.AgentKey.
Pls replace this with the correct XML before invoking the service. --->
<agentKey/>
Since I can't deploy a valid WSDL, I can't get either Axis or Excel to
connect to my web services.
When I attempt to invoke Axis' (beta 1.1) wsdl2java I recieve the
following message.
java.io.IOException: ERROR: Fault is missing a name= attribute in operation
"serviceWithPrimitiveDatatypes", in binding {http://sillyurl.com/reallysilly}ExampleAgentPortSoapBinding.
This seems understandable considering the issues I mentioned earlier.
Unfortunately Excel doesn't really give me anything to go with. If I
type in the WSDL URI then it will give me a list of methods I can
invoke, but if I try to add the service I get the very unhelpful "The
Web Service References Tool could not generate the requested code.
Any changes that were made to your project have been rolled back."
Any help with those two issues would be greatly appreciated also.
One final issue is that I cannot seem to fix is taskdef'ing
<servicegen> properly from Ant. I can do the actual taskdef but then
it cannot find classes from within the weblogic.jar. If I run the
setExamplesEnv.cmd first the I don't need to do the taskdef and
everything works fine. Has anyone else had this issue? (we can't run
that command on our clients desktops before we build our build scripts
- anyway, I've put it down to one of those weird Ant classpath
issues.)
In summary:
Problems I can see and would like some help on are:
- multiple exception messages
- fault operations with no name
- the ability to generate client code with complex data types before
the EAR is deployed.
Could the product team add
- a clean way to add in schema datatypes without having to manually
hack the web-services.xml file.
I know this has been quite a long email, but it has been months in the
making. Anyone's time would be greatly appreciated.
Mark Mansour
Agentis Software
[email protected]

Hi Mark,
From your base post:
My next problem deals with the validity of the WSDL. I am seeing that
the WSDL created has exceptions defined multiple times. I saw a
message from Manjo saying that it looked like a bug. I agree and
would like to get a copy of the patch. On a more significant note,
when is either SP2 or 7.1 due for release?I would recommend starting here with support since getting valid WSDL seems to be the root of most of
your issues.
Concerning the upcoming release, I believe it is scheduled for late this quarter; contact Michael
([email protected]) for more information.
Also, at the bottom of this post:
I would just like to see an automated way to do this (I've had to write my own
utility to do this for me :(Does the autotype ant task help in this situation? Have you taken a look at this?
http://e-docs.bea.com/wls/docs70/webserv/anttasks.html#1080062
Thanks,
Bruce
Mark Mansour wrote:
Hiya Bruce,
I will try and get some time to follow this up with the support people too.
In response:
Problems I can see and would like some help on are:
- multiple exception messages
In your client code, you can set the following property to avoid the exceptionmessages so that the typemapping
registry can be setup.
//dont parse wsdl till we set the typemapping
System.setProperty( "weblogic.webservice.servicenamechecking","false" );
This is not a client issue. The WSDL is generating incorrect WSDL. Here is a
little snippet :
<message name="AgentisException" >
<part name="AgentisException" xmlns:partns="http://www.w3.org/2001/XMLSchema"
type="partns:string" />
</message>
<message name="setTraceLevel" >
<part name="agentKey" xmlns:partns="java:net.agentis.apml.runtime" type="partns:AgentKey"
/>
<part name="intVal" xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:int"
/>
</message>
<message name="AgentisException" >
<part name="AgentisException" xmlns:partns="http://www.w3.org/2001/XMLSchema"
type="partns:string" />
</message>
As you can see the AgentisException is defined twice (in my real WSDL it is redefined
every time a method has the AgentisException in its interface (which in my case
is 5 times))
- fault operations with no nameI believe the fault issues that you have raised have been addressed in the upcomingrelease that will be
available for beta testing shortly. Contact [email protected] if you
want to participate in the beta.
great. Is there any ETA on the final release date?
- the ability to generate client code with complex data types before
the EAR is deployed.
There is an example to show how to do this: http://dev2dev.bea.com/direct/webservice/dyncmplx.zip
Unfortunately this doesn't solve my problem. I still don't have an EAR or WSDL
file from which I can generate a client to be included in the final EAR file that
gets deployed to the server. My original post explains this a bit better.
Could the product team add
- a clean way to add in schema datatypes without having to manually
hack the web-services.xml file.
Take a look at http://dev2dev.bea.com/direct/webservice/wswa.html#qz50 and others
in this area.
This was more in reference to the building of the web services in the first place
rather than registering custom datatypes at runtime. The manual procedure is
documented at http://edocs.bea.com/wls/docs70/webserv/customdata.html#1058102,
I would just like to see an automated way to do this (I've had to write my own
utility to do this for me :(
Hope this helps,
Bruce
Thanks Bruce.
Mark

Similar Messages

  • Fault element name issues

    Back in January I noticed a post concerning generated WSDL files and fault
    element not containing a required attribute "name".
    I seem to be having the same problem in WLS8.1
    Can this be possible since it was fixed in version 7SP2?
    After I generate the web service, when I try to generate a JAXRPC client
    (via the JavaSoft web services toolkit), it complains that the WSDL file is
    invalid because there are <FAULT> elements without name attributes.
    Also, I'm having a problem using the clientgen Ant task, its having an error
    generating types. This worked 2 days ago when I was running 8.1beta, but
    since I upgraded to 8.1 it no longer works.
    M
    "Bruce Stephens" <[email protected]> wrote in message
    news:[email protected]...
    Hi Mark,
    From your base post:
    My next problem deals with the validity of the WSDL. I am seeing that
    the WSDL created has exceptions defined multiple times. I saw a
    message from Manjo saying that it looked like a bug. I agree and
    would like to get a copy of the patch. On a more significant note,
    when is either SP2 or 7.1 due for release?I would recommend starting here with support since getting valid WSDLseems to be the root of most of
    your issues.
    Concerning the upcoming release, I believe it is scheduled for late thisquarter; contact Michael
    ([email protected]) for more information.
    Also, at the bottom of this post:
    I would just like to see an automated way to do this (I've had to write
    my own
    utility to do this for me :(Does the autotype ant task help in this situation? Have you taken a lookat this?
    http://e-docs.bea.com/wls/docs70/webserv/anttasks.html#1080062
    Thanks,
    Bruce
    Mark Mansour wrote:
    Hiya Bruce,
    I will try and get some time to follow this up with the support people
    too.
    >>
    In response:
    Problems I can see and would like some help on are:
    - multiple exception messages
    In your client code, you can set the following property to avoid the
    exception
    messages so that the typemapping
    registry can be setup.
    //dont parse wsdl till we set the typemapping
    System.setProperty(
    "weblogic.webservice.servicenamechecking","false" );
    >>>
    >>
    This is not a client issue. The WSDL is generating incorrect WSDL.Here is a
    little snippet :
    <message name="AgentisException" >
    <part name="AgentisException"xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    <message name="setTraceLevel" >
    <part name="agentKey"xmlns:partns="java:net.agentis.apml.runtime" type="partns:AgentKey"
    />
    <part name="intVal"xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:int"
    />
    </message>
    <message name="AgentisException" >
    <part name="AgentisException"xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    As you can see the AgentisException is defined twice (in my real WSDL itis redefined
    every time a method has the AgentisException in its interface (which inmy case
    is 5 times))
    - fault operations with no nameI believe the fault issues that you have raised have been addressed in
    the upcoming
    release that will be
    available for beta testing shortly. Contact [email protected]
    if you
    want to participate in the beta.
    great. Is there any ETA on the final release date?
    - the ability to generate client code with complex data types before
    the EAR is deployed.There is an example to show how to do this:
    http://dev2dev.bea.com/direct/webservice/dyncmplx.zip
    >>
    Unfortunately this doesn't solve my problem. I still don't have an EARor WSDL
    file from which I can generate a client to be included in the final EARfile that
    gets deployed to the server. My original post explains this a bitbetter.
    >>
    Could the product team add
    - a clean way to add in schema datatypes without having to manually
    hack the web-services.xml file.
    Take a look at http://dev2dev.bea.com/direct/webservice/wswa.html#qz50
    and others
    in this area.
    This was more in reference to the building of the web services in thefirst place
    rather than registering custom datatypes at runtime. The manualprocedure is
    documented athttp://edocs.bea.com/wls/docs70/webserv/customdata.html#1058102,
    I would just like to see an automated way to do this (I've had to writemy own
    utility to do this for me :(
    Hope this helps,
    Bruce
    Thanks Bruce.
    Mark

    Please try 8.1 sp1, it is strictly wsdl spec complaint. It generates
    <fault> with name.. Clientgen requires fault name to correctly parse wsdl.
    thanks,
    -Neal
    "Mark Fine" <[email protected]> wrote in message
    news:[email protected]...
    Back in January I noticed a post concerning generated WSDL files and fault
    element not containing a required attribute "name".
    I seem to be having the same problem in WLS8.1
    Can this be possible since it was fixed in version 7SP2?
    After I generate the web service, when I try to generate a JAXRPC client
    (via the JavaSoft web services toolkit), it complains that the WSDL fileis
    invalid because there are <FAULT> elements without name attributes.
    Also, I'm having a problem using the clientgen Ant task, its having anerror
    generating types. This worked 2 days ago when I was running 8.1beta, but
    since I upgraded to 8.1 it no longer works.
    M
    "Bruce Stephens" <[email protected]> wrote in message
    news:[email protected]...
    Hi Mark,
    From your base post:
    My next problem deals with the validity of the WSDL. I am seeing that
    the WSDL created has exceptions defined multiple times. I saw a
    message from Manjo saying that it looked like a bug. I agree and
    would like to get a copy of the patch. On a more significant note,
    when is either SP2 or 7.1 due for release?I would recommend starting here with support since getting valid WSDLseems to be the root of most of
    your issues.
    Concerning the upcoming release, I believe it is scheduled for late thisquarter; contact Michael
    ([email protected]) for more information.
    Also, at the bottom of this post:
    I would just like to see an automated way to do this (I've had to write
    my own
    utility to do this for me :(Does the autotype ant task help in this situation? Have you taken a
    look
    at this?
    http://e-docs.bea.com/wls/docs70/webserv/anttasks.html#1080062
    Thanks,
    Bruce
    Mark Mansour wrote:
    Hiya Bruce,
    I will try and get some time to follow this up with the support people
    too.
    In response:
    Problems I can see and would like some help on are:
    - multiple exception messages
    In your client code, you can set the following property to avoid the
    exception
    messages so that the typemapping
    registry can be setup.
    //dont parse wsdl till we set the typemapping
    System.setProperty(
    "weblogic.webservice.servicenamechecking","false" );
    >
    This is not a client issue. The WSDL is generating incorrect WSDL.Here is a
    little snippet :
    <message name="AgentisException" >
    <part name="AgentisException"
    xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    <message name="setTraceLevel" >
    <part name="agentKey"xmlns:partns="java:net.agentis.apml.runtime" type="partns:AgentKey"
    />
    <part name="intVal"
    xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:int"
    />
    </message>
    <message name="AgentisException" >
    <part name="AgentisException"
    xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    As you can see the AgentisException is defined twice (in my real WSDL
    it
    is redefined
    every time a method has the AgentisException in its interface (which
    in
    my case
    is 5 times))
    - fault operations with no nameI believe the fault issues that you have raised have been addressed
    in
    the upcoming
    release that will be
    available for beta testing shortly. Contact [email protected]
    if you
    want to participate in the beta.
    great. Is there any ETA on the final release date?
    - the ability to generate client code with complex data types
    before
    the EAR is deployed.There is an example to show how to do this:
    http://dev2dev.bea.com/direct/webservice/dyncmplx.zip
    Unfortunately this doesn't solve my problem. I still don't have an
    EAR
    or WSDL
    file from which I can generate a client to be included in the final
    EAR
    file that
    gets deployed to the server. My original post explains this a bitbetter.
    Could the product team add
    - a clean way to add in schema datatypes without having to manually
    hack the web-services.xml file.Take a look at
    http://dev2dev.bea.com/direct/webservice/wswa.html#qz50
    and others
    in this area.
    This was more in reference to the building of the web services in thefirst place
    rather than registering custom datatypes at runtime. The manualprocedure is
    documented at
    http://edocs.bea.com/wls/docs70/webserv/customdata.html#1058102,
    I would just like to see an automated way to do this (I've had to
    write
    my own
    utility to do this for me :(
    Hope this helps,
    Bruce
    Thanks Bruce.
    Mark

  • Proplem by custom datatype

    hello everyone,
    I want to implement a web service between server and mobile phone, the web service is in dotnet plattform and the client is in java plattform (j2me), now i can only receive a response with simple datatype, i.e., int and string or their arrays. but i have now a custom datatype, Address include name and address etc. and i want to receive an array of such dataype, how can i do it?
    now i have the following exception:
    the server is unable to process the request....
    an error occurs when generating the xml documents.....
    thx in advance
    best regards
    Yaning

    maksim, thanks for ur tips, but now i have such a problem, i send my request, but the content in buffer as response is such exception:
    SoapFault - faultcode: 'soap:Server' faultstring: 'System.Web.Services.Protocols.SoapException:
    the server is unable to process the request
    ---> System.InvalidOperationException:
    an error occurs when generating the xml documents ---> System.InvalidOperationException:
    the type System.Object can not be used in this context
    at System.Xml.Serialization.XmlSerializationWriter.WriteReferencedElement(String name, String ns, Object o, Type ambientType)........
    the soap sample for this function is as following:
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://192.168.1.3/Server2BB_WebService/Server2BBService" xmlns:types="http://192.168.1.3/Server2BB_WebService/Server2BBService/encodedTypes" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <q2:getAddressesResponse xmlns:q2="http://192.168.1.3/Server2BB-WebService/Server2BBService">
          <getAddressesResult href="#id1" />
        </q2:getAddressesResponse>
        <soapenc:Array id="id1" xmlns:q1="http://192.168.1.3/Server2BB_WebService/CAS_Address" soapenc:arrayType="q1:CAS_Address[2]">
          <Item href="#id2" />
          <Item href="#id3" />
        </soapenc:Array>
        <q4:CAS_Address id="id2" xsi:type="q4:CAS_Address" xmlns:q4="http://192.168.1.3/Server2BB_WebService/CAS_Address">
          <CAS_GUID xsi:type="xsd:int">int</CAS_GUID>
    </soap:Body>
    </soap:Envelope>
    so i dont know how can i resolve this problem at the server side or web service side, can you tell me where did i something wrong?
    thanks in advance

  • Generic WSDL element name

    Hi Gurus,
    For normal web services integration what kind of WSDL file should we use? custom or generic?
    If we using generic how to check the element name or the display name?
    Please advice.
    Thanks in advance.

    Hi, Would suggest custom, unless you like to build something that is generic which can work across multiple instances of CRMOD or goes across all fields / objects etc. Otherwise it may not worth the effort of managing the integration tags mapping related activities
    -- Venky CRMIT

  • Photoshop Elements has stopped working, Faulting module name: ntdll.dll

    I use windows 7, pse 9, I went to the application and log and this is the error message I get:
    Faulting application name: PhotoshopElementsEditor.exe, version: 9.0.0.0, time stamp: 0x4ca3884b
    Faulting module name: ntdll.dll, version: 6.1.7601.17725, time stamp: 0x4ec49b60
    Exception code: 0xc0000005
    Fault offset: 0x0001f8c4
    Faulting process id: 0xca8
    Faulting application start time: 0x01cd513a0df54fd0
    Faulting application path: C:\Program Files\Adobe\Photoshop Elements 9\PhotoshopElementsEditor.exe
    Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
    Report Id: 7fee6f40-bd2d-11e1-9d1b-e0cb4eddc8b4
    The organizer works fine but editor has never worked for me and I just installed it a few days ago
    Message title was edited by: Brett N

    Thanks for the log info. We've seen instances of that "ntdll.dll" as the faulting module before, see if this Adobe document helps, even though it's for Acrobat:
    http://helpx.adobe.com/acrobat/kb/acrobat-8-crashes-error-cites.html
    Ken

  • Regarding custom currency data element issue in custom Table.....

    Hello,
    I am currently working on creation of a Z custom table in SAP. There is data coming from
    mainframe for amount field in the form -9999.9999.
    To store data like this I am creating a custom Z data element with Z domain definition as follows:
    Data type; Curr
    No of characters: 5
    Decimal places: 4
    Sign box is checked.
    Now when I use this Z data elemnt for a firle in custom table, while activating, it asks for table refernce and table field. What do I give it here ?
    Please help.
    Regards,
    Jainam..

    Hi Jainam,
    very basic ABAP knowledge: A field of type CURR isn used to store a currency amount. Every currency field must be connected to a currency key of type CUKY.
    The same concept applies for quantities and units.
    You can spare a lot of trouble if you look at standard tables and programs, copy or use data elements and/or structures from standard.
    If you want to re-invent the world, you may need more than seven days.
    Regards,
    Clemens

  • Compiler issue when different case element names

    Hi
    Given this simple schema where two elements with the same name but a different case exist causes problems with the generated code.
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="test">
    <xsd:complexType mixed="false">
    <xsd:sequence>
    <xsd:element ref="TEST" minOccurs="1" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="TEST">
    <xsd:complexType mixed="false">
    <xsd:sequence>
    <xsd:element name="data" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    The compiler only generates class files for one of the Test elements, but refers to both (test and TEST) in the ObjectFactory class for example -> therefore I get compiler errors. Is there a way around this (e.g. bindings) without changing the schema.
    Thankyou
    AB

    Looking at the compiler output, it says it has generated the conflicting classes (e.g. TEST.java and Test.java), but when I look in the directory, only Test.java is there. I am assuming this may be a MS Windows problem. I am running this on Windows 2000 and the first file may be overwriting the second file - just a thought.
    If I can get hold of a UNIX box I will give it another go.
    AB

  • Handling BPEL custom business faults in 11g

    Hi All,
    I am trying to work with 11g BPEL custom business faults based on fault-policies and following options are tried, but no success
    1. Use Throw activity to throw business fault and handle it in fault-policies
    2. Receive SOAP:Fault from OSB partnerlink and handle it in fault-policies
    Flow Description_
    BPEL<sync=>OSB
    Fault-Policy used*
    <faultName xmlns:ns="http://schemas.org/2207/Services"
    name="ns:BusinessFault">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    OSB WSDL*
    &lt;wsdl:message name="Business_ResponseFaultMessage"&gt;
    &lt;wsdl:part name="BusinessFault" element="tns:BusinessFault"&gt;&lt;/wsdl:part&gt;
    &lt;/wsdl:message&gt;
    &lt;wsdl:portType name="IntegrationService"&gt;
    &lt;wsdl:operation name="Order"&gt;
    &lt;wsdl:input message="tns:IntegrationService_InputMessage"/&gt;
    &lt;wsdl:output message="tns:IntegrationService_OutputMessage"/&gt;
    &lt;wsdl:fault name="BusinessFault" message="tns:Business_ResponseFaultMessage"&gt;&lt;/wsdl:fault&gt;
    &lt;/wsdl:operation&gt;
    &lt;/wsdl:portType&gt;
    &lt;wsdl:binding name="IntegrationSoap" type="tns:IntegrationService"&gt;
    &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http"/&gt;
    &lt;wsdl:operation name="Order"&gt;
    &lt;soap:operation soapAction="Order" style="document"/&gt;
    &lt;wsdl:input&gt;
    &lt;soap:body use="literal"/&gt;
    &lt;/wsdl:input&gt;
    &lt;wsdl:output&gt;
    &lt;soap:body use="literal"/&gt;
    &lt;/wsdl:output&gt;
    &lt;wsdl:fault name ="BusinessFault" &gt;
    &lt;soap:fault name="BusinessFault" use="literal" /&gt;
    &lt;/wsdl:fault&gt;
    &lt;/wsdl:operation&gt;
    &lt;/wsdl:binding&gt;
    I have defined BusinessFault in xsd and xsd is referenced with in OSB WSDL.
    *1st case result*
    When I use Throw activity,business fault is being raised but always going to CatchAll in BPEL, but I would like to handle through fault-policies.
    _2nd case result_
    OSB partnerlink is returning SOAP:Fault to BPEL, but BPEL is always taking it as remoteFault, not as a business fault.
    When I ran OSB service,I can clearly see SOAP:Fault being thrown,but When I invoke from EM console it is always complaining like
    *     Either the WSDL URL is invalid or the WSDL file is not valid or incorrect. - Failed to model operation: {"http://schemas.org/2207/Services}Order(,)*
    *Reason: Could not find definition for element: {"http://schemas.org/2207/Services}BusinessFault Detail:*
    SOAP:Fault returned by OSB is
    &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soapenv:Header/&gt;
    &lt;soapenv:Body&gt;
    &lt;soap-env:Fault xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;faultcode&gt;soap-env:Server&lt;/faultcode&gt;
    &lt;faultstring&gt;Unable to find order offer for supplied product: ZINDA&lt;/faultstring&gt;
    &lt;detail&gt;
    &lt;ns:BusinessFault xmlns:ns="http://schemas.org/2207/Services"&gt;
    &lt;OrderResponse xmlns="http://schemas.org/2207/Services" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;Errors&gt;
    &lt;ErrorMsgl Code="Unknown"&gt;Unable to find offer for supplied product: ZINDA&lt;/ErrorDetail&gt;
    &lt;/Errors&gt;
    &lt;Status&gt;Failed&lt;/Status&gt;
    &lt;/OrderResponse&gt;
    &lt;/ns:BusinessFault&gt;
    &lt;/detail&gt;
    &lt;/soap-env:Fault&gt;
    &lt;/soapenv:Body&gt;
    &lt;/soapenv:Envelope&gt;
    Any ideas where we are going wrong?
    Thanks,
    Praveen
    Edited by: Praveen Vaddanam on Apr 3, 2012 5:23 AM
    Edited by: Praveen Vaddanam on Apr 3, 2012 5:32 AM

    Hi
    Did you find a solution to your problem. I am also facing a similar problem.
    Thanks

  • Unexpected element name: expected error while invoking external web service

    Hi,
    In JDeveloper when I invoke external web service call, I am getting following exception
    "unexpected element name: expected=..."
    But the same application works fine in .NET. Can someone help me as to why I am getting the exception only in JDeveloper and how to fix this exception.
    Thanks.

    Hi,
    Without more information, it will be hard to help, and tell you what could be teh issue.
    Usually, this kind of error occurs when the payload and the WSDL schema are out of sync, for example if the order of the element on the wire do not match the order in a sequence declaration, you may get this error.
    In such case, .NET handle the XML as if it was a 'all' -- no specific order -- and deserialize the message properly.
    Hope this helps,
    -eric

  • Partner link name issue in B2B-BPEL

    Hi,
    I configured B2B-BPEL interoperability. I am able to see the B2B adapter services wsdl from jdeveloper. I configured custom xml using ebMS protocol in B2B. while creating the partner link for that. it is showing wsdl path:
    http://127.0.0.1:8888/orainfra/wsil/adapters/B2B/Custom/ebMS+Document+Protocol+Revision1-1.0/ebMS+doc+type1/ebMS+doc+def1?wsdl.
    In BPEL, symbols "+, ?" were not supported so i am getting the error like "Name is not a valid NCNAME".
    please some help me to resolve this.

    Hi Ramesh,
    I have applied the latest Patch (Patch Number- 5983622) and Configured the custom over ebMS(I could see from jdeveloper- partnerlink using the B2B WSIL browser). when i click the patnerlink- it shows the /adapters/B2B/Custom/ebMS+Document+protocol+revision1.0/ebMS+doc+type/ebMS+doc+def.
    For wsdl file it shows the location: http://127.0.0.1:8888/orainfra/wsil/adapters/B2B/Custom/ebMS+Document+Protocol+Revision-1.0/ebMS+doc+type/ebMS+doc+def?wsdl.
    I opened this using IE. I found wdsl that:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions name="ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0" targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/aq/ebMS+doc+type_ebMS+Document+Protocol+Revision-1.0/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/aq/ebMS+doc+type_ebMS+Document+Protocol+Revision-1.0/" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/" xmlns:pc="http://xmlns.oracle.com/pcbpel/" xmlns:imp1="http://www.w3.org/2001/XMLSchema" xmlns:obj1="http://xmlns.oracle.com/xdb/B2B/">
    - <types>
    - <!-- Define AQ Headers = Payload Headers + Static Queue Headers
    -->
    - <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/aq/ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/aq/inbound/">
    <import namespace="http://xmlns.oracle.com/xdb/B2B/" schemaLocation="ebMS+doc+def/B2B_IP_MESSAGE_TYPE.xsd" />
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/aq/inbound/" schemaLocation="ebMS+doc+def/aqAdapterHeader.xsd" />
    - <complexType name="HeaderType">
    - <sequence>
    - <!-- static header
    -->
    <element name="QueueHeader" type="hdr:HeaderType" />
    - <!-- payload header
    -->
    <element name="PayloadHeader" type="obj1:IP_MESSAGE_TYPE" />
    </sequence>
    </complexType>
    <element name="Header" type="tns:HeaderType" />
    </schema>
    - <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="ebMS+doc+def/ebMS+doc+def.xsd" />
    </schema>
    </types>
    - <message name="ebMS+doc+type_msg">
    <part name="ebMS+doc+type1" element="imp1:ebMS+doc+type" />
    </message>
    - <message name="Header_msg">
    <part name="Header" element="tns:Header" />
    </message>
    - <portType name="Enqueue_ptt">
    - <operation name="Enqueue_ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0">
    <input message="tns:ebMS+doc+type1_msg" />
    </operation>
    </portType>
    - <portType name="Dequeue_ptt">
    - <operation name="Dequeue_ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0">
    <input message="tns:ebMS+doc+type1_msg" />
    </operation>
    </portType>
    - <binding name="Enqueue_binding" type="tns:Enqueue_ptt">
    <jca:binding />
    - <operation name="Enqueue_ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0">
    <jca:operation InteractionSpec="oracle.tip.adapter.aq.outbound.AQEnqueueInteractionSpec" QueueName="IP_OUT_QUEUE" DatabaseSchema="B2B" ObjectFieldName="PAYLOAD" RecipientList="b2buser" OpaqueSchema="false" PayloadHeaderRequired="true" />
    - <input>
    <jca:header message="tns:Header_msg" part="Header" />
    </input>
    </operation>
    </binding>
    - <binding name="Dequeue_binding" type="tns:Dequeue_ptt">
    <pc:inbound_binding />
    - <operation name="Dequeue_ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0">
    <jca:operation ActivationSpec="oracle.tip.adapter.aq.inbound.AQDequeueActivationSpec" QueueName="IP_IN_QUEUE" DatabaseSchema="B2B" ObjectFieldName="PAYLOAD" Consumer="b2buser" OpaqueSchema="false" PayloadHeaderRequired="true" />
    - <input>
    <jca:header message="tns:Header_msg" part="Header" />
    </input>
    </operation>
    </binding>
    - <service name="ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0">
    - <port name="Enqueue_pt" binding="tns:Enqueue_binding">
    <jca:address adapterInstanceJndi="eis/b2b" UIConnectionName="b2b" />
    </port>
    - <port name="Dequeue_pt" binding="tns:Dequeue_binding">
    <jca:address adapterInstanceJndi="eis/b2b" UIConnectionName="b2b" />
    </port>
    </service>
    - <plt:partnerLinkType name="PLT_ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0_send">
    - <plt:role name="B2BSend_ebMS+doc+type_ebMS+Document+Protocol+Revision-1.0">
    <plt:portType name="tns:Enqueue_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    - <plt:partnerLinkType name="PLT_ebMS+doc+type1_ebMS+Document+Protocol+Revision1-1.0receive">
    - <plt:role name="B2BReceive_ebMS+doc+type_ebMS+Document+Protocol+Revision-1.0">
    <plt:portType name="tns:Dequeue_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    So i am facing the symbols "+, ?" were not supported so i am getting the error like "Name is not a valid NCNAME".

  • Unexpected element name - confusion of types in client

    I have a web service definition that performs four operations:
    - String getTitle(long) - returns a title for a single asset
    - StringArrayType) getTitles(LongArrayType) - returns an ordered list of titles matching input list
    - AssetSummaryType getSummary(long) - Returns a complex type, summary information of an asset
    - AssetSummaryArrayType getSummaries(LongArrayType) - Returns an array of complex types
    Based on the WSDL (included at the bottom of this posting) I then generate the service
    endpoint using wscompile and -f:wsi option (JDK 1.4.2-05 and JWSDP-1.4).
    This is built into a raw war file and then cooked using wsdeploy.
    On the client side I create stubs using wscompile and -f:wsi and compile
    the resultant code. My client invokes each of the operations in turn, having been
    provided the relevant 'longs' as input.
    The service is deployed in JBoss-3.2.2 and the client is then executed from a separate JVM.
    I then see the following client error:
    java.rmi.RemoteException: Runtime exception; nested exception is:
    unexpected element name: expected={http://example.com/myAssetWebSvc}Str
    ingElement, actual={http://example.com/MyAssetWebSvc}AssetSummaryElement
    at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(
    StreamingSender.java:318)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:300
    at example.com.wsclient.asset.AssetService_Stub.getTitle(AssetService_St
    ub.java:175)
    at example.com.wsclient.asset.AssetClient.testAssetTitleRetrieval(AssetC
    lient.java:82)
    at example.com.wsclient.asset.AssetClient.main(AssetClient.java:51)
    Caused by: unexpected element name: expected={http://example.com/MyAssetWebSvc}
    StringElement, actual={http://example.com/MyAssetWebSvc}AssetSummaryElement
    at com.sun.xml.rpc.encoding.literal.LiteralSimpleTypeSerializer.deserial
    ize(LiteralSimpleTypeSerializer.java:106)
    at example.com.wsclient.asset.AssetService_Stub._deserialize_getTitle(As
    setService_Stub.java:318)
    at example.com.wsclient.asset.AssetService_Stub._readFirstBodyElement(As
    setService_Stub.java:276)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:215
    ... 3 more
    If I deploy the same service with only the first two operations defined within wsdl,
    the error is not seen.
    I have also tried compilation on JWSDP 1.3 and JDK 1.4.1-03 and in this case the same error
    occurs but the other way around. The two 'title' operations work but the summary
    operations fail with the actual element encountered being a StringElement or StringArrayElement
    and the expected an AssetSummaryElement or AssetSummaryArrayElement.
    Further, if I change the name of the StringElement to for example 'MyStringElement', this is
    reported as the actual - i.e. there is no confusion with a standard type at play here.
    I also use handlers, one on the server side to inspect security information and one on the
    client to insert relevant details and look for returned errors within the header.
    Is this a known problem within JWSDP 1.3 and/or 1.4? Are there any workarounds.
    My wsdl is provided below along with the wscompile options and the matching configuration
    files used.
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions name="MyAssetService" targetNamespace="http://example.com/MyAssetWebSvc"
         xmlns:tns="http://example.com/MyAssetWebSvc"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <wsdl:types>
    <xsd:schema targetNamespace="http://example.com/MyAssetWebSvc"
              xmlns:tns="http://example.com/MyAssetWebSvc"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:complexType name="AssetSummaryType">
    <xsd:all>
    <xsd:element name="createdBy" type="xsd:string" />
    <xsd:element name="createdDate" type="xsd:dateTime" />
    <xsd:element name="description" type="xsd:string" />
    <xsd:element name="fileSize" type="xsd:long" />
    <xsd:element name="id" type="xsd:long" />
    <xsd:element name="modifiedBy" type="xsd:string" />
    <xsd:element name="modifiedDate" type="xsd:dateTime" />
    <xsd:element name="organisation" type="xsd:string" />
    <xsd:element name="owner" type="xsd:string" />
    <xsd:element name="title" type="xsd:string" />
    <xsd:element name="type" type="xsd:string" />
    <xsd:element name="version" type="xsd:long" />
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="ExceptionType">
    <xsd:all>
    <xsd:element name="rootCause" type="xsd:string" nillable="true" />
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="LongArrayType">
         <xsd:sequence>
              <xsd:element name="LongItem" type="xsd:long" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="AssetSummaryArrayType">
         <xsd:sequence>
              <xsd:element name="AssetSummaryItem" type="tns:AssetSummaryType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="StringArrayType">
         <xsd:sequence>
              <xsd:element name="StringItem" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CredentialsType">
    <xsd:all>
    <xsd:element name="principal" type="xsd:string" />
    <xsd:element name="password" type="xsd:string" />
    </xsd:all>
    </xsd:complexType>
         <xsd:element name="LongElement" type="xsd:long"/>
    <xsd:element name="StringElement" type="xsd:string"/>
    <xsd:element name="LongArrayElement" type="tns:LongArrayType"/>
    <xsd:element name="StringArrayElement" type="tns:StringArrayType"/>
    <xsd:element name="AssetSummaryElement" type="tns:AssetSummaryType"/>
    <xsd:element name="AssetSummaryArrayElement" type="tns:AssetSummaryArrayType"/>
         <xsd:element name="CredentialsElement" type="tns:CredentialsType"/>
         <xsd:element name="ExceptionElement" type="tns:ExceptionType"/>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="getSummaryMessage">
    <wsdl:part name="resourceId" element="tns:LongElement" />
    </wsdl:message>
    <wsdl:message name="getSummaryResponse">
    <wsdl:part name="assetSummary" element="tns:AssetSummaryElement" />
    </wsdl:message>
    <wsdl:message name="assetException">
    <wsdl:part name="exception" element="tns:ExceptionElement" />
    </wsdl:message>
    <wsdl:message name="getTitle">
    <wsdl:part name="resourceId" element="tns:LongElement" />
    </wsdl:message>
    <wsdl:message name="getTitleResponse">
    <wsdl:part name="assetTitle" element="tns:StringElement" />
    </wsdl:message>
    <wsdl:message name="getSummaries">
    <wsdl:part name="resourceIdList" element="tns:LongArrayElement" />
    </wsdl:message>
    <wsdl:message name="getSummariesResponse">
    <wsdl:part name="assetSummaryList" element="tns:AssetSummaryArrayElement" />
    </wsdl:message>
    <wsdl:message name="getTitles">
    <wsdl:part name="resourceIdList" element="tns:LongArrayElement" />
    </wsdl:message>
    <wsdl:message name="getTitlesResponse">
    <wsdl:part name="assetTitleList" element="tns:StringArrayElement" />
    </wsdl:message>
    <wsdl:message name="securityHeader">
    <wsdl:part name="credentials" element="tns:CredentialsElement" />
    </wsdl:message>
    <wsdl:portType name="AssetService">
    <wsdl:operation name="getSummary" parameterOrder="resourceId">
    <wsdl:input message="tns:getSummaryMessage" />
    <wsdl:output message="tns:getSummaryResponse" />
    <wsdl:fault name="AssetException" message="tns:assetException" />
    </wsdl:operation>
    <wsdl:operation name="getTitle" parameterOrder="resourceId">
    <wsdl:input message="tns:getTitle" />
    <wsdl:output message="tns:getTitleResponse" />
    <wsdl:fault name="AssetException" message="tns:assetException" />
    </wsdl:operation>
    <wsdl:operation name="getSummaries" parameterOrder="resourceIdList">
    <wsdl:input message="tns:getSummaries" />
    <wsdl:output message="tns:getSummariesResponse" />
    <wsdl:fault name="AssetException" message="tns:assetException" />
    </wsdl:operation>
    <wsdl:operation name="getTitles" parameterOrder="resourceIdList">
    <wsdl:input message="tns:getTitles" />
    <wsdl:output message="tns:getTitlesResponse" />
    <wsdl:fault name="AssetException" message="tns:assetException" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="AssetServiceBinding" type="tns:AssetService">
    <wsdl:operation name="getSummary">
    <wsdl:input>
    <soap:header required="true" message="tns:securityHeader" part="credentials" use="literal" actor="security"/>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="AssetException">
    <soap:fault name="AssetException" use="literal"/>
    </wsdl:fault>
    <soap:operation soapAction="" />
    </wsdl:operation>
    <wsdl:operation name="getTitle">
    <wsdl:input>
    <soap:header required="true" message="tns:securityHeader" part="credentials" use="literal"/>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="AssetException">
    <soap:fault name="AssetException" use="literal"/>
    </wsdl:fault>
    <soap:operation soapAction="" />
    </wsdl:operation>
    <wsdl:operation name="getSummaries">
    <wsdl:input>
    <soap:header required="true" message="tns:securityHeader" part="credentials" use="literal"/>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="AssetException">
    <soap:fault name="AssetException" use="literal"/>
    </wsdl:fault>
    <soap:operation soapAction="" />
    </wsdl:operation>
    <wsdl:operation name="getTitles">
    <wsdl:input>
    <soap:header required="true" message="tns:securityHeader" part="credentials" use="literal"/>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="AssetException">
    <soap:fault name="AssetException" use="literal"/>
    </wsdl:fault>
    <soap:operation soapAction="" />
    </wsdl:operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    </wsdl:binding>
    <wsdl:service name="MyAssetService">
    <wsdl:port name="AssetServicePort" binding="tns:AssetServiceBinding">
    <soap:address location="http://localhost:9090/MyAssetWebSvc/asset" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Here is the wscompile for the server - this is within an ant script that substitutes the variables specified:
    wscompile -keep -d ${path.classes} -s ${src.autojava} -import -model model.gz -f:wsi -f:documentliteral server-config.xml
    and this is the server config:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl location="file:///C:temp/MyAssetService_wsi.wsdl" packageName="example.com.wsserver.asset.wrapper">
    <handlerChains>
    <chain runAt="server">
    <handler className="example.com.wsserver.security.SecurityServerHandler">
    <property name="name" value="SecurityServerHandler"/>
    </handler>
    </chain>
    </handlerChains>
    </wsdl>
    </configuration>
    On the client side, here is the wscompile, again with ant variable substitution:
    wscompile -gen:client -keep -d ${path.build.wsclient.class} -s ${path.build.wsclient.autojava} -classpath ${path.build.wsclient.class} -f:wsi -f:documentliteral client-config.xml
    And here is the client config:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl location="file:///C:/temp/MyAssetService_wsi.wsdl" packageName="example.com.wsclient.asset">
    <handlerChains>
    <chain runAt="client">
    <handler className="example.com.wsclient.security.SecurityClientHandler">
    <property name="name" value="SecurityClientHandler"/>
    </handler>
    </chain>
    </handlerChains>
    </wsdl>
    </configuration>
    Note that I generate slightly different packages on client and server side. The server includes a 'wrapper' path on the package name - purely because the
    generated code wrappers an existent api that I am making available as a web service. This is not needed to be seen
    on the client side - i.e. the service appears as is without the wrapper.
    I have tried omitting the documentliteral from the wscompiles and this seems to have no effect.
    Any help gratefully received.
    Best regards
    Lawrence

    Thanks for the prompting. I was convinced that the error was occurring client side as I could see no activity on the server. However having captured the soap request and responses its evident that this is not the case (which I'm a little confused on based on my original tests, but the error makes more sense in this context).
    The request is below:
    <env:Envelope xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://example.com/myAssetWebSvc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header>
    <ns1:mmsSecurity env:actor="security" env:mustUnderstand="1" xmlns:ns1="http://example.com/myAssetWebSvc">
    <principal>example.user</principal>
    <password>mypassword</password>
    </ns1:mmsSecurity>
    </env:Header>
    <env:Body>
    <ns0:LongElement>166333</ns0:LongElement>
    </env:Body>
    </env:Envelope>
    I can see from the body that the signature is not unique - its the same as that of the Summary operation. In this case, the server side is performing the summary (rather than the title that I had intended) and returning that response. This gives rise to the deserialisation error on the client side for the response.
    Presumably I need to move to the wrapped document literal style so that the request is uniquely identified on the server side.
    To me this was not an obvious gotcha, Could the parser (wscompile) be enhanced to trap identical request message definitions within a single service/endpoint definition (i.e. WSDL)? If so where should I post the request?

  • BPEL Compilation Error: Load of wsdl "with Message part element undefined..

    Hi Friends,
    I am getting following error while compiling my BPEL process:
    Error: Load of wsdl "FTPWrite.wsdl with Message part element undefined in wsdl [file:/D:/MyData/_MyProjects/052_Amazon_MetadataInterface/001_SVN/002_Intl/trunc/MetadataInterfaceIntl_2013Apr15_WorkingCode/MetadataInterface_Intl/MetadataInterface_Intl.wsdl] part name = reply     type = {http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types}processResponse" failed
    However the reply message is already defined in the MetadataInterface_Intl.wsdlas shown below:
    Code for MetadataInterface_Intl.wsdl::::
    "<?xml version= '1.0' encoding= 'UTF-8' ?>
    <wsdl:definitions
    name="MetadataInterface_Intl"
    targetNamespace="http://xmlns.oracle.com/MetadataInterfaceIntl/MetadataInterface_Intl/MetadataInterface_Intl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:inp1="http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types"
    xmlns:tns="http://xmlns.oracle.com/MetadataInterfaceIntl/MetadataInterface_Intl/MetadataInterface_Intl"
    >
    <wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types" schemaLocation="xsd/Metadata_Interface.xsd"/>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="requestMessage">
    <wsdl:part name="request" element="inp1:process"/>
    </wsdl:message>
    *<wsdl:message name="replyMessage">*
    *<wsdl:part name="reply" element="inp1:processResponse"/>*
    *</wsdl:message>*
    <wsdl:portType name="execute_ptt">
    <wsdl:operation name="execute">
    <wsdl:input message="tns:requestMessage"/>
    <wsdl:output message="tns:replyMessage"/>
    </wsdl:operation>
    </wsdl:portType>
    </wsdl:definitions>"
    Surprisingly, this same code was compiling file last week and now I have no clue why I am getting this error. Can someone please shade some light on this issue?
    Thanks,
    Sachin.

    Hello
    I have had the same problem in Oracle BPM and solved it using the following steps:
    1- In your application navigator window, expand the project that contains the business rule.
    2- In the SOA Content, double click on your wsdl file.
    3- When the file opens, select the schema view from the bottom of the page.
    4- In the schema view, expand all the schema nodes and check if you see any values in red. If you see one, that value has probably caused the error and you should correct it using the property inspector window.
    In my case, the schema location value was set to a wrong path, so I changed it and the error resolved.
    Also, some error that appear as warning in the rule editor will show as compile error later, such as input types not being used and such, so those must be resolved before compiling.
    Hope that was helpful
    good luck

  • Missing namespace on XAI Inbound Service Fault Element

    Hi,
    when a XAI Inbound service errors out, it uses the Fault element defined in the WSDL, which normally should be:
    +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">+
    +<soapenv:Body>+
    +<soapenv:Fault>+
    +<faultcode>soapenv:Client</faultcode>+
    +<faultstring>Client Error</faultstring>+
    +<detail>+
    *+<ouaf:Fault xmlns:ouaf="urn:oracle:ouaf">+*                 
    -- omiting details
    +</ouaf:Fault>+
    +</detail>+
    +</soapenv:Fault>+
    +</soapenv:Body>+
    +</soapenv:Envelope>+
    However, in one environment i am getting this response, without the namespace:
    +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">+
    +<soapenv:Body>+
    +<soapenv:Fault><faultcode>soapenv:Client</faultcode>+
    +<faultstring>Client Error</faultstring>+
    +<detail>+
    *+<ouafFault>+*              
    -- Omiting Details
    +</ouafFault>+
    +</detail>+
    +</soapenv:Fault>+
    +</soapenv:Body>+
    +</soapenv:Envelope>+
    This happens both for Custom and Base XAI Inbound services.
    Already validated the patching level between environments.
    The logs do not show any obvious difference.
    I will appreciate any idea or suggestion.
    Thanks
    Regards
    Ernesto.

    All the environments had the same patching level and our problem was in one environment only.
    We cloned the rowking environment ontop of the non-working one and it's solved, although we don't know which was the reason. My guess is some of the patches was not properly applied.
    Thanks
    Regards
    Chipi.

  • Unexpected element name: expected WHEN INVOKING A WEB SERVICE

    I am pretty new to Web Services and need some helping in resolving the following error. I created following two classes and published one of the method savePerson. When I tried to invoke the webservice through my browser passing the following:
    <ns1:savePersonElement xmlns:ns1="http://mypackage17/Person.wsdl/types">
    <ns1:sex>simpleType value</ns1:sex>
    <ns1:human>
    <ns2:last xmlns:ns2="http://tempuri.org">simpleType value</ns2:last>
    <ns3:first xmlns:ns3="http://tempuri.org">simpleType value</ns3:first>
    </ns1:human>
    </ns1:savePersonElement>
    I get the following error:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://mypackage17/Person.wsdl/types">
    <env:Body>
    <env:Fault>
    <faultcode>env:Client</faultcode>
    <faultstring>caught exception while handling request: unexpected element name: expected={http://mypackage17/Person.wsdl/types}name, actual={http://mypackage17/Person.wsdl/types}sex</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    But passing the following works fine as have passed all the parameters data:
    <ns1:savePersonElement xmlns:ns1="http://mypackage17/Person.wsdl/types">
    <ns1:name>simpleType value</ns1:name>
    <ns1:sex>simpleType value</ns1:sex>
    <ns1:human>
    <ns2:last xmlns:ns2="http://tempuri.org">simpleType value</ns2:last>
    <ns3:first xmlns:ns3="http://tempuri.org">simpleType value</ns3:first>
    </ns1:human>
    </ns1:savePersonElement>
    Here is the code I have for the webservice:
    package mypackage17;
    *@oracle.ws.WebService name = "MyWebService2", serviceName = "MyWebService2", description = "", targetNamespace = "http://tempuri.org", schemaTargetNamespace = "http://mypackage17/Person.wsdl/types", endpointInterface = "mypackage17.MyWebService1SEI"
    *@oracle.ws.SOAPBinding style = "DOCUMENT", use = "LITERAL", documentWrapped = "true", bindingName = "MyWebService1SoapHttp", portName = "MyWebService1Port"
    public class Person extends Human
    private String name;
    private String sex;
    public Person(){}
    public void setName(String name)
    this.name = name;
    public void setSex(String sex)
    this.sex = sex;
    public String getName()
    return this.name;
    public String getSex()
    return this.sex;
    *@oracle.ws.DocumentWrapper requestType = "savePerson", requestElement = "savePersonElement", requestPart = "parameters", responseType = "savePersonResponse", responseElement = "savePersonResponseElement", responsePart = "parameters"
    *@oracle.ws.WebMethod operationName = "savePerson", description = "", oneway = "false", documentWrapped = "true", inputMessage = "MyWebService1SEI_savePerson", outputMessage = "MyWebService1SEI_savePersonResponse", responsePart = "result"
    *@oracle.ws.ParamPart position = "0", partName = "name", mode = "IN", soapHeader = "false"
    *@oracle.ws.ParamPart position = "1", partName = "sex", mode = "IN", soapHeader = "false"
    *@oracle.ws.ParamPart position = "2", partName = "human", mode = "IN", soapHeader = "false"
    public void savePerson(String name, String sex, Human[] human)
    System.out.println("Name: " + name);
    System.out.println("Sex: " + sex);
    System.out.println(human.length);
    System.out.println("1 First: " + human[0].getFirst());
    System.out.println("1 Last: " + human[0].getLast());
    System.out.println("2 First: " + human[1].getFirst());
    System.out.println("2 Last: " + human[1].getLast());
    /****** THE OTHER CLASS ********/
    package mypackage17;
    public class Human
    private String first;
    private String last;
    public Human(){}
    public void setFirst(String first)
    this.first = first;
    public void setLast(String last)
    this.last = last;
    public String getFirst()
    return this.first;
    public String getLast()
    return this.last;
    Here is the WSDL generated using JDeveloper 10.1.3:
    <?xml version="1.0" encoding="UTF-8" ?>
    <definitions
    name="MyWebService2"
    targetNamespace="http://tempuri.org"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://tempuri.org"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:ns1="http://mypackage17/Person.wsdl/types"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org" elementFormDefault="qualified"
    xmlns:tns="http://tempuri.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
    <import namespace="http://mypackage17/Person.wsdl/types"/>
    <complexType name="Human">
    <sequence>
    <element name="last" type="string" nillable="true"/>
    <element name="first" type="string" nillable="true"/>
    </sequence>
    </complexType>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mypackage17/Person.wsdl/types"
    elementFormDefault="qualified" xmlns:tns="http://mypackage17/Person.wsdl/types"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://tempuri.org">
    <import namespace="http://tempuri.org"/>
    <complexType name="savePerson">
    <sequence>
    <element name="name" type="string" nillable="true"/>
    <element name="sex" type="string" nillable="true"/>
    <element name="human" type="ns1:Human" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    <complexType name="savePersonResponse">
    <sequence/>
    </complexType>
    <element name="savePersonElement" type="tns:savePerson"/>
    <element name="savePersonResponseElement" type="tns:savePersonResponse"/>
    </schema>
    </types>
    <message name="MyWebService1SEI_savePerson">
    <part name="parameters" element="ns1:savePersonElement"/>
    </message>
    <message name="MyWebService1SEI_savePersonResponse">
    <part name="parameters" element="ns1:savePersonResponseElement"/>
    </message>
    <portType name="MyWebService2">
    <operation name="savePerson">
    <input message="tns:MyWebService1SEI_savePerson"/>
    <output message="tns:MyWebService1SEI_savePersonResponse"/>
    </operation>
    </portType>
    <binding name="MyWebService1SoapHttp" type="tns:MyWebService2">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="savePerson">
    <soap:operation soapAction="http://tempuri.org:savePerson"/>
    <input>
    <soap:body use="literal" parts="parameters"/>
    </input>
    <output>
    <soap:body use="literal" parts="parameters"/>
    </output>
    </operation>
    </binding>
    <service name="MyWebService2">
    <port name="MyWebService1Port" binding="tns:MyWebService1SoapHttp">
    <soap:address location="http://192.168.2.101:8988/JavaWebService/MyWebService2"/>
    </port>
    </service>
    </definitions>
    Can someone tell what am I doing wrong. As it looks like I have to pass all the parameters for the method that is published but what if some are missing basically I want to keep all the parameters optional. How can I make the service to return the same what is passed when invoked. Any help is appreciated. I am using JDeveloper 10.1.3.

    To make the service return "whatever is passed", you have to take a step back and realize that there is a little understanding of XML Schema required.
    When using a complexType, which is defined as a sequence, then you are implying an ordered sequence of elements. Default value for the 'minOccurs' attribute is 1. It's also important to understand that there is a difference between minOccurs=0 and nillable="true".
    nillable="true" just means that the name element can carry a null value. If you want the name element to be optional, then you must use the minOccurs=0 and keep the maxOccurs to it's default value of 1. Using an array is just a bad work around. This is for deserialization (XML to JAVA).
    The second part of you problem is on the serialization (or JAVA to XML). When you have a JAVA Bean, there is no way to make the difference between a member's value being null or not set, so it's impossible to decide if you need to send back a nul (xsi:nil="true"), an empty element <ns1:name/> or nothing.
    That said, if you do want to go the XML route, you can use the dataBinding="false" flag in the different WSA command. Instead of converting XML into JAVA, you will have SOAPElement parameters, where you can do all you want (see WS user's guide [1] for details - chapter 16). Note that you have to make sure that the WSDL (your contract) reflect what you are doing on the wire (format of your messages), so that you do not geopardize your interoperability with other toolkit.
    Note that this only applies to literal message formats (use attribute in WSDL), which is your case.
    Hope this helps,
    Eric
    [1] http://download-west.oracle.com/otn_hosted_doc/ias/preview/web.1013/b14434.pdf

  • Creating custom soapenv:Fault by OSB 11g.

    Hello,
    I am working on a message flow on soap proxy service which will generate a custom soap fault alrady defined on it's wsdl.
    On the error handler if I replace the $body variable with the expected soap fault it returned it withing the soapenv:Body and not soapenv:Fault element.
    Here the response with an error:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Header xmlns:mes="http://www.test.com/MEBS/Interfaces/ManageAccountReceivable/AccountReceivableManagement/v1/message"/>
       <soapenv:Body xmlns:mes="http://www.test.com/MEBS/Interfaces/ManageAccountReceivable/AccountReceivableManagement/v1/message">
          <mes:FindAndGetCustomerAccountFault>
             <fault>
                <label>002168</label>
                <FaultDetail>
                   <fieldName>ERREUR</fieldName>
                </FaultDetail>
             </fault>
          </mes:FindAndGetCustomerAccountFault>
       </soapenv:Body>
    </soapenv:Envelope>
    Is there a way to get my content (<mes:FindAndGetCustomerAccountFault> ...</mes:FindAndGetCustomerAccountFault>) inside a soapenv:Fault element ?
    Choosing reply with success or with failure doesn't change any thing on my response.
    Thanks,
    Badreddine

    I think, in this case, you need to construct the xml with the soap fault structure and replace the $body variable. For example:
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server</faultcode>
    <faultstring>Error</faultstring>
    <detail>
         <mes:FindAndGetCustomerAccountFault xmlns:mes="http://www.test.com/MEBS/Interfaces/ManageAccountReceivable/AccountReceivableManagement/v1/message">
         </mes:FindAndGetCustomerAccountFault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>

Maybe you are looking for

  • Does the Lexmark Interact S605 work with Maverick?

    I'm quite excited by Maverick's price - but the last two times I updated my Mac's OS, my Lexmark ceased working. It took multiple phone calls to Lexmark and them to finally admit they hadn't developed the software necessary to run on Mac's latest OS.

  • Updating KFig with diff. Units to same one

    Hi experts, I am trying to update a Kfig form two different  infosources with Kfig having different units. Unit for one is fixed ie, EA and for second one is 0base_oum but again is made constant from TR rules. Now when I try to create update rules fo

  • Adobe AIR application crash on start in iOS devices

    I have Adobe AIR application that uses Starling and DragonBones. We use IntelliJ IDE. We can run the application on the device without problem when running from the IDE. We build an ad-hoc distribution and put it on a device using TestFlight. When we

  • Photoshop CS4 Plug in

    Is there a plug in for Photoshop CS 4 that will allow me to open Nikon D800 Raw files

  • Why won't all my photo stream photos download to my pc

    i have 951 photos on my iphone photo stream but only 119 will open on my pc.  please help.