Consuming an ASP web service which responds with complex data types...

Here's my problem - I'm trying to consume a web service from a provider that uses complex data types.
The starting part of the WSDL looks like this (I've not included the whole thing) - named have been changed to protect the innocent:
<wsdl:definitions targetNamespace="http://domain_name">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://domain_name">
<s:element name="Authentication">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Token"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AuthenticateResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AuthOK" type="s:int"/>
<s:element minOccurs="0" maxOccurs="1" name="Token"/>
</s:sequence>
</s:complexType>
</s:element>
Since it's a complexType return, with a sequence, I'd expect an array or structure returned, but instead I just get the "AuthOK" value, and no way to get anything else.
Here are the ways I've tried calling it:
<cfscript>
    WS = createObject("webservice", "https://WSDL_URL");
    WS_ret = WS.Authentication(Username = "username", Password = "password", Token = "");
</cfscript>
<cfdump var="#WS_ret#" />
<cfinvoke webservice="WSDL_URL" method="Authentication" returnVariable="WS_ret">
    <cfinvokeargument name="userID" value="7253320" />
    <cfinvokeargument name="password" value="ctpjxs3" />
    <cfinvokeargument name="SecurityToken" value="" />
</cfinvoke>
<cfdump var="#WS_ret#" />
Any ideas how I can get the other variables in the sequence? I have other calls after this that have a much larger amount of variables, and as such I can't use it without being about to get more of the

Thanks for the reply.
If I CFDUMP the variable it returns just "1", no XML tags, nothing at all around the data - according to the web service providers they say that they are supplying the Token part as long as the first variable is "1" (a logical true if the authentication passed). If it is "0" then no Token is returned, that is why it's optional.
As for the CFdocs issue, look here:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=webservices_25.html
The paragraph before it (about 2/3 down the page) states:
In this example, the operation updateEmployeeInfo takes a complex type as input and returns a complex type as output. To handle the input parameter, you create a structure. To handle the returned value, you write it to a ColdFusion variable, as the following example shows:
It even states that you call "updateEmployeeInfo", and nowhere mentions "echoStruct" as a method - it's seemingly been put in as a random method name, or a function call for something else. The WSDL above the example only mentions "updateEmployeeInfo" and "updateEmployeeInfoSoapOut", again not mentioning "echoStruct".
I see this as an error in the docs as it's calling a non-existant entity in the WSDL, which should cause a run-time error.

Similar Messages

  • Creating Web service for PL/SQL Procedure with Complex Data Types

    I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

    Hello,
    When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
    So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
    You can find more information in the:
    - Developing Web Services that Expose Database Resources
    chapter of the Web Service Developer's guide.
    Regards
    Tugdual Grall

  • Working with complex data types in web services ...

    Hi All,
    I have created a webservice and created an interface for that in ADF. Now as my web service returns a complex data type, i followed the steps given in this article "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" and it works fine, my results also get displayed. But only issue is i get a warning "JBO-25009: Cannot create an object of type:java.util.calendar with value:2008-09-23T23:51:30.000+05:30" and if i replace all the java.util.Date with oracle.jbo.domain.Date then i get a warning "JBO-25009: Cannot create an object of type:oracle.jbo.domain.Date with value:2008-09-23T23:51:30.000+05:30". Now i am unable to understand this although i believe it is a data type mapping issue, but not sure how to rectify it.
    Anybody knows the wayout?
    Regards
    Lokesh

    Andre,
    Thanks for youe response. I also tried makeing data type as string in place of date in data control.xml and it worked fine. So it confirms that i am facing with exactly similar issue as yours.
    I tried solution 2 mentioned in Frank's mail but its not helping[in fact i am already using web proxy as i am delaing with complex data types]. I created a web proxy and in java bean i placed break points to check the control flow[in order to check the root cause] but control never reaches the java bean!! I am not sure about the cause for it...control should pass through java bean isn't it??
    I am quite new to SOA...so can somebody just elaborate on how to rectify this using web proxy. I have been using this rl "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" to work with web proxies" to work with proxies.
    Regards
    Lokesh

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • ++Custom Serialization with Complex Data type (Nested Classes)

    Hi,
    We have a scenario wherein we need to write CUSTOM SERIALIZERS for complex datatypes like INVOICE & ORDER (INVOICE inturn has ADDRESS type among others, ORDER has ADDRESS type, a COLLECTION of type ORDERITEM each of which are Java Classes in themselves)
    The example of Custom Serializer given in the SOA AS Dev Guide http://download.oracle.com/docs/cd/B31017_01/web.1013/b28975/custserial.htm#CFHHIBCA)
    shows only a simple java type used for serialization and deserialization.
    Can anyone please help us out by sharing any example depicting the CUSTOM SERIALIZERs for COMPLEX DATA TYPES?
    Thanks in advance,
    Pavan.

    Hello,
    Could you please post the code of your classes in the forum (at least the interfaces) ?
    Regards
    Tugdual Grall

  • Web Services with Complex Data Types in ADF 11g

    Shay Shmeltzer's following blogpost can answer my questions but all the links there
    http://blogs.oracle.com/shay/2009/09/web_services_with_complex_data.html
    Can you please point us to the correct links for the following documents?
    http://www.oracle.com/technology/tech/fmw4apps/agile/pdf/adf11g-agile.pdf
    http://www.oracle.com/technology/products/jdev/tips/fnimphius/wsdccomplexinputtype/index.html

    Thanks. We are using a Java Proxy to consume the web service as we need to use JAX-WS handlers. We created data control from the service stub that was created by the proxy. Our issue is with the response XML which comes as a complex type. Also, the data control is understanding the complex type and is creating the structure right. The problem is when we drag that control on a JSF page. No data is displayed. We think that we are not traversing the complex object properly which is creating the issue.
    I understand that you answer related to the input is applicable to output as well. We can change the structure by flattening it but we thought that in 11G there is some new features where we can use the complex types out of the box without any change. Is that true? Also, any luck in finding the documents (broken links) on your blog page?

  • Web service call problem with complex types input

    We are trying to call a web service and pass as parameter
    some complex types. When invoking the web service everything works
    well on flex side, but on the server side the input parameters we
    get from flex are not correct - complex type is removed and the
    elements of the complex type are sent. See the example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:WebService id="ws_id" wsdl="link" useProxy="false"
    fault="wsFault(event)">
    <mx:operation id="op_id" name="op"
    result="wsResult(event)">
    <mx:request>
    <parameters>
    <parameter1>{value1}</parameter1>
    <parameter2>{value2}</parameter2>
    <parameter3>{value3}</parameter3>
    <parameter4>
    <parameter4_1>{value4_1}</parameter4_1>
    <parameter4_2>{value4_2}</parameter4_2>
    <parameter4_3>{value4_3}</parameter4_3>
    </parameter4>
    </parameters>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    </mx:Application>
    on server side we get this:
    <parameters>
    <parameter1>{value1}</parameter1>
    <parameter2>{value2}</parameter2>
    <parameter3>{value3}</parameter3>
    <parameter4_1>{value4_1}</parameter4_1>
    <parameter4_2>{value4_2}</parameter4_2>
    <parameter4_3>{value4_3}</parameter4_3>
    </parameters>
    Instead of :
    <parameters>
    <parameter1>{value1}</parameter1>
    <parameter2>{value2}</parameter2>
    <parameter3>{value3}</parameter3>
    <parameter4>
    <parameter4_1>{value4_1}</parameter4_1>
    <parameter4_2>{value4_2}</parameter4_2>
    <parameter4_3>{value4_3}</parameter4_3>
    </parameter4>
    </parameters>
    Any idea how is it possible to send complex type as web
    service input from flex ?

    Hi,
    I also have similar type of problem where I need to invoke a Web service with Complex input parameters.
    I followed Susan's blog but I stuck at a point where methos getItem is created.
    Can anyone tell me how to get that method for my requirement.
    If possible can you guys share your solutions here.
    Thanks in advance.

  • Manual WSDL creation with Complex data types

    I'm trying to manually generate a WSDL, for a bpel workflow, so the wsdl constructs do not come from a Java class file, or any of the other normal ways you might generate a WSDL.
    I have successfully created a Definition object from the WSDLFactory, with the code shown below, that appears to be correct, based on reverse engineering of a WS compliant WSDL. The reversed engineered WSDL was created by IONA Artix.
    When I use file WSDLFactoryImpl.WSDLWriterImpl.writeWSDL() to write the WSDL file I get the wsdl:types and wsdl:service definition objectsin the file, but not the wsdl:message, wsdl:portType or wsdl:binding objects.
    The reverse engineered WSDL file has been imported into objects via WSDLReaderImpl, and the resulting Definition object appears correct (based on all system.outs). This definition can be successfully written to file via the same WSDLFactoryImpl.WSDLWriterImpl.writeWSDL(). which results in a correct WSDL file.
    I'm hoping someone can spot my problem.
    Chris Yoerg
    WSDLFactory.java************************************************************************************************
    package com.dralasoft.bpel.util;
    import java.util.*;
    import java.io.*;
    import javax.xml.namespace.QName;
    import javax.xml.parsers.*;
    import javax.wsdl.WSDLException;
    import javax.wsdl.extensions.UnknownExtensibilityElement;
    import org.w3c.dom.*;
    import com.ibm.wsdl.*;
    import com.ibm.wsdl.factory.WSDLFactoryImpl;
    import com.ibm.wsdl.extensions.soap.*;
    /** This class generates a wsdl from scratch
    * the way the namespaces have been left seem to be correct in that the individual
    * porttype, binding and service objects pick up the message parts as seen in the
    * individual system.outs and in the system.out of the definition
    * if you use the tns prefix iteration as seen in the comment out "trial" code
    * you get an error that the tns namespace does not exist in the definition
    * even though it is definitely there
    * the non namespace "trial" code also behaves the same way as this iteration,
    * aka the stuff shows in the definition outputs, but never ends up outputed to
    * file */
    //import com.dralasoft.bpel.BPELWorkflow;
    public class WSDLFactory {
    public WSDLFactory() {
    public void makeWorkflowWSDL(){
    WSDLFactoryImpl factory = null;
    Constants constants = new Constants();
    SOAPConstants soapconstants = new SOAPConstants();
    try {
    factory = (WSDLFactoryImpl) WSDLFactoryImpl.newInstance();
    catch (WSDLException we) {
    System.out.println("wsdl excepiotn " + we.getMessage());
    // get a new definition from the factory
    DefinitionImpl definition = (DefinitionImpl) factory.newDefinition();
    // add target namespace and additional namespaces that might be there
    definition.setTargetNamespace("http://www.yoerg.net");
    definition.addNamespace("tns", "http://www.yoerg.net");
    definition.addNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
    definition.addNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
    definition.addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/");
    // added for generic purposes
    definition.addNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
    // specify the service name
    QName qname = new QName("http://www.yoerg.net",
    "PurchaseOrderProcess");
    definition.setQName(qname);
    // create types **********************************************************
    TypesImpl types = (TypesImpl) definition.createTypes();
    // generate a schema in DOM to set into the types object
    javax.xml.parsers.DocumentBuilderFactory domfactory =
    javax.xml.parsers.DocumentBuilderFactory.newInstance();
    javax.xml.parsers.DocumentBuilder builder = null;
    try {
    builder = domfactory.newDocumentBuilder();
    catch (javax.xml.parsers.ParserConfigurationException pce) {
    System.out.println("parser config exception " + pce.getMessage());
    DOMImplementation dImpl = builder.getDOMImplementation();
    // namespace for the schema
    String namespaceURI = "http://www.w3.org/2001/XMLSchema";
    Document doc = dImpl.createDocument(namespaceURI, "schema", null);
    Element schema = doc.getDocumentElement();
    //schema.setPrefix("xsd");
    schema.setAttribute("xmlns", "http://www.w3.org/2001/XMLSchema");
    schema.setAttribute("targetNamespace", "http://www.yoerg.net");
    //set other namespaces on schema
    // this doesn't make it into the schema at final save, because there
    // are no wsdl elements inside the box
    schema.setAttribute("xmlns:wsdl", "http://schemas.xmlsoap.org/wsdl/");
    // this is not needed
    schema.setAttribute("tns", "http://www.yoerg.net");
    Element first = doc.createElement("element");
    first.setAttribute("name", "sendPurchaseOrder");
    first.setAttribute("type", "tns:sendPORequest");
    schema.appendChild(first);
    Element fourth = doc.createElement("element");
    fourth.setAttribute("name", "sendSchedule");
    fourth.setAttribute("type", "tns:sendScheduleRequest");
    schema.appendChild(fourth);
    Element fifth = doc.createElement("element");
    fifth.setAttribute("name", "sendInvoice");
    fifth.setAttribute("type", "tns:sendInvoiceRequest");
    schema.appendChild(fifth);
    // now add correlations
    Element corfirst = doc.createElement("element");
    corfirst.setAttribute("name", "correlations");
    corfirst.setAttribute("type", "tns:correlationset");
    schema.appendChild(corfirst);
    Element second = doc.createElement("element");
    second.setAttribute("name", "portType");
    second.setAttribute("type", "xsd:string");
    schema.appendChild(second);
    Element third = doc.createElement("element");
    third.setAttribute("name", "partnerLink");
    third.setAttribute("type", "xsd:string");
    schema.appendChild(third);
    // sequence element thats used over and over
    Element sequence = null;
    Element sixth = doc.createElement("complexType");
    sixth.setAttribute("name", "sendPORequest");
    sequence = doc.createElement("sequence");
    Element part1 = doc.createElement("element");
    part1.setAttribute("name", "customerId");
    part1.setAttribute("type", "xsd:long");
    sequence.appendChild(part1);
    Element part2 = doc.createElement("element");
    part2.setAttribute("name", "purchaseOrderNumber");
    part2.setAttribute("type", "xsd:long");
    sequence.appendChild(part2);
    Element part3 = doc.createElement("element");
    part3.setAttribute("name", "productId");
    part3.setAttribute("type", "xsd:long");
    sequence.appendChild(part3);
    Element part4 = doc.createElement("element");
    part4.setAttribute("name", "quantity");
    part4.setAttribute("type", "xsd:int");
    sequence.appendChild(part4);
    sixth.appendChild(sequence);
    schema.appendChild(sixth);
    Element seventh = doc.createElement("complexType");
    seventh.setAttribute("name", "sendScheduleRequest");
    sequence = doc.createElement("sequence");
    Element part6 = doc.createElement("element");
    part6.setAttribute("name", "shipDate");
    part6.setAttribute("type", "xsd:dateTime");
    sequence.appendChild(part6);
    Element part7 = doc.createElement("element");
    part7.setAttribute("name", "customerId");
    part7.setAttribute("type", "xsd:long");
    sequence.appendChild(part7);
    Element part8 = doc.createElement("element");
    part8.setAttribute("name", "purchaseOrderNumber");
    part8.setAttribute("type", "xsd:long");
    sequence.appendChild(part8);
    seventh.appendChild(sequence);
    schema.appendChild(seventh);
    Element eighth = doc.createElement("complexType");
    eighth.setAttribute("name", "sendInvoiceRequest");
    sequence = doc.createElement("sequence");
    Element part5 = doc.createElement("element");
    part5.setAttribute("name", "price");
    part5.setAttribute("type", "xsd:double");
    sequence.appendChild(part5);
    Element part9 = doc.createElement("element");
    part9.setAttribute("name", "customerId");
    part9.setAttribute("type", "xsd:long");
    sequence.appendChild(part9);
    Element part10 = doc.createElement("element");
    part10.setAttribute("name", "purchaseOrderNumber");
    part10.setAttribute("type", "xsd:long");
    sequence.appendChild(part10);
    eighth.appendChild(sequence);
    schema.appendChild(eighth);
    Element ninth = doc.createElement("complexType");
    ninth.setAttribute("name", "correlationset");
    sequence = doc.createElement("sequence");
    Element part11 = doc.createElement("element");
    part11.setAttribute("name", "PurchaseOrder");
    part11.setAttribute("type", "tns:correlationsetvalues");
    sequence.appendChild(part11);
    ninth.appendChild(sequence);
    schema.appendChild(ninth);
    Element tenth = doc.createElement("complexType");
    tenth.setAttribute("name", "correlationsetvalues");
    sequence = doc.createElement("sequence");
    Element part12 = doc.createElement("element");
    part12.setAttribute("name", "PurchaseOrderNumber");
    part12.setAttribute("type", "xsd:string");
    sequence.appendChild(part12);
    Element part13 = doc.createElement("element");
    part13.setAttribute("name", "customerID");
    part13.setAttribute("type", "xsd:string");
    sequence.appendChild(part13);
    tenth.appendChild(sequence);
    schema.appendChild(tenth);
    // show the schema w3c element via conversion JDOM Element and coversion to string
    org.jdom.input.DOMBuilder jdbuilder = new org.jdom.input.DOMBuilder();
    org.jdom.Element jelement = jdbuilder.build(schema);
    //System.out.println("\njelement " + jelement);
    org.jdom.output.XMLOutputter xmloutput = new org.jdom.output.XMLOutputter();
    xmloutput.setIndent(" ");
    xmloutput.setNewlines(true);
    xmloutput.setTrimAllWhite(true);
    xmloutput.setTextTrim(true);
    xmloutput.setEncoding("ISO-8859-1");
    String strelement = xmloutput.outputString(jelement);
    System.out.println("schema in jdom = \n " + strelement);
    UnknownExtensibilityElement extel = new UnknownExtensibilityElement();
    extel.setElement(schema);
    extel.setElementType(new QName(Constants.Q_ELEM_XSD_2001.getNamespaceURI(),
    schema.getLocalName()));
    types.addExtensibilityElement(extel);
    // the above is preferrable to this
    //types.setDocumentationElement(schema);
    //System.out.println("schema " + schema);
    // and set the types definiton back to the definition object
    definition.setTypes(types);
    // these lines all show null or empty on system.out.println
    //System.out.println("\ntypes " + types);
    // end of setting the types
    // add the messages*******************************************************
    MessageImpl message1 = (MessageImpl)definition.createMessage();
    QName messageqname= new QName("http://www.yoerg.net", "newMessage");
    message1.setQName(messageqname);
    PartImpl partma = (PartImpl)definition.createPart();
    partma.setName("sendPurchaseOrderBody");
    partma.setElementName(new QName("http://www.yoerg.net", "sendPurchaseOrder"));
    message1.addPart(partma);
    partma = (PartImpl)definition.createPart();
    partma.setName("correlationsBody");
    partma.setElementName(new QName("http://www.yoerg.net", "correlations"));
    message1.addPart(partma);
    partma = (PartImpl)definition.createPart();
    partma.setName("portTypeBody");
    partma.setElementName(new QName("http://www.yoerg.net", "portType"));
    message1.addPart(partma);
    partma = (PartImpl)definition.createPart();
    partma.setName("partnerLinkBody");
    partma.setElementName(new QName("http://www.yoerg.net", "partnerLink"));
    message1.addPart(partma);
    definition.addMessage(message1);
    // create new blank message for response, with no parts
    MessageImpl message2 = (MessageImpl)definition.createMessage();
    QName messageqname2= new QName("http://www.yoerg.net", "sendPurchaseOrderResponseMessage");
    message2.setQName(messageqname2);
    definition.addMessage(message2);
    System.out.println("\nmessage1 " + message1);
    System.out.println("\nmessage2 " + message2);
    //Map map = message.getParts();
    //Element mes = message.getDocumentationElement();
    //System.out.println("\nmessage map = " + map);
    // done adding messages
    // add the porttypes******************************************************
    PortTypeImpl porttype = (PortTypeImpl)definition.createPortType();
    porttype.setQName(new QName("http://www.yoerg.net", "purchaseOrderPortType"));
    OperationImpl operation = (OperationImpl)definition.createOperation();
    operation.setName("sendMyPurchaseOrder");
    operation.setStyle(javax.wsdl.OperationType.REQUEST_RESPONSE);
    InputImpl input = (InputImpl)definition.createInput();
    input.setName("sendPurchaseOrderRequest");
    input.setMessage(message1);
    operation.setInput(input);
    OutputImpl output = (OutputImpl)definition.createOutput();
    output.setName("sendPurchaseOrderResponse");
    output.setMessage(message2);
    operation.setOutput(output);
    porttype.addOperation(operation);
    System.out.println("\nporttype " + porttype);
    definition.addPortType(porttype);
    // done adding the porttypes
    // add the bindings*******************************************************
    BindingImpl binding = (BindingImpl)definition.createBinding();
    binding.setQName(new QName("http://www.yoerg.net",
    "purchaseOrderSOAPBinding"));
    binding.setPortType(porttype);
    SOAPBindingImpl bindingextension = new SOAPBindingImpl();
    bindingextension.setStyle("document");
    bindingextension.setTransportURI("http://schemas.xmlsoap.org/soap/http");
    //System.out.println("binding extension " + bindingextension);
    binding.addExtensibilityElement(bindingextension);
    BindingOperationImpl bindingoperation
    = (BindingOperationImpl)definition.createBindingOperation();
    bindingoperation.setName("sendMyPurchaseOrder");
    bindingoperation.setOperation(operation);
    // this is not present in the Imported correct version, and these lines of code
    // are not necessary, but they also do not hurt or help
    //SOAPOperationImpl operationextension = new SOAPOperationImpl();
    //operationextension.setStyle("document");
    //operationextension.setSoapActionURI("");
    ///////operationextension.setElementType(new QName("http://www.yoerg.net", "ListenerService"));
    //operationextension.setRequired(new Boolean(true));
    //bindingoperation.addExtensibilityElement(operationextension);
    BindingInputImpl bindinginput
    = (BindingInputImpl)definition.createBindingInput();
    bindinginput.setName("sendPurchaseOrderRequest");
    SOAPBodyImpl inputextension = new SOAPBodyImpl();
    inputextension.setUse("literal");
    inputextension.setRequired(new Boolean(true));
    inputextension.setNamespaceURI("http://www.yoerg.net");
    bindinginput.addExtensibilityElement(inputextension);
    //System.out.println("\ninputextension " + inputextension);
    bindingoperation.setBindingInput(bindinginput);
    BindingOutputImpl bindingoutput
    = (BindingOutputImpl)definition.createBindingOutput();
    bindingoutput.setName("sendPurchaseOrderResponse");
    SOAPBodyImpl outputextension = new SOAPBodyImpl();
    outputextension.setUse("literal");
    outputextension.setRequired(new Boolean(true));
    outputextension.setNamespaceURI("http://www.yoerg.net");
    bindingoutput.addExtensibilityElement(outputextension);
    //System.out.println("\noutputextension " + outputextension);
    bindingoperation.setBindingOutput(bindingoutput);
    binding.addBindingOperation(bindingoperation);
    System.out.println("\nbinding " + binding);
    definition.addBinding(binding);
    // done adding binding
    // adding service*********************************************************
    ServiceImpl service = (ServiceImpl)definition.createService();
    service.setQName(new QName("http://www.yoerg.net",
    "ListenerServiceService"));
    PortImpl port = (PortImpl)definition.createPort();
    port.setBinding(binding);
    port.setName("ListenerService");
    SOAPAddressImpl soapaddress = new SOAPAddressImpl();
    soapaddress
    .setLocationURI("http://localhost:8080/axis/services/ListenerService");
    port.addExtensibilityElement(soapaddress);
    service.addPort(port);
    definition.addService(service);
    System.out.println("\nService " + service);
    // done adding service
    // print def object, and you will see all objects, except types
    System.out.println("\ndefinition \n" + definition);
    // output to file, just like we would in bpel workflow environment
    com.ibm.wsdl.xml.WSDLWriterImpl writer
    = (com.ibm.wsdl.xml.WSDLWriterImpl)factory.newWSDLWriter();
    File file = new File("c:\\chris\\w.wsdl");
    FileOutputStream out = null;
    // this has been proven to be correct
    try{
    out = new FileOutputStream(file);
    writer.writeWSDL(definition, out);
    catch(FileNotFoundException fnfe){
    System.out.println("file not found " + fnfe.getMessage());
    catch(IOException ioe){
    System.out.println("file not found " + ioe.getMessage());
    catch(javax.wsdl.WSDLException we){
    System.out.println("wsdl exception " + we.getMessage());
    // now bring it back in just for fun
    FileInputStream in = null;
    byte[] inputfile = null;
    org.jdom.Document jdocument = null;
    try{
    in = new FileInputStream(file);
    inputfile = new byte[in.available()];
    in.read(inputfile, 0, in.available());
    org.jdom.input.SAXBuilder jdombuilder = new org.jdom.input.SAXBuilder();
    ByteArrayInputStream byteinput = new ByteArrayInputStream(inputfile);
    jdocument = jdombuilder.build(byteinput);
    catch(FileNotFoundException fnfe){
    System.out.println("file not found " + fnfe.getMessage());
    catch(org.jdom.JDOMException jde){
    System.out.println("jdom exception " + jde.getMessage());
    catch(IOException ioe){
    System.out.println("io exception " + ioe.getMessage());
    String strdocument = xmloutput.outputString(jdocument);
    System.out.println("\nJDOM beautified version \n" + strdocument);
    public static void main(String[] args){
    WSDLFactory factory = new WSDLFactory();
    factory.makeWorkflowWSDL();
    End ofWSDLFactory.java*********************************************************************
    Desired WSDL output to file******************************************************************
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="PurchaseOrderProcess" targetNamespace="http://www.yoerg.net"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:http-conf="http://schemas.iona.com/transports/http/configuration"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.yoerg.net" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <types>
    <schema targetNamespace="http://www.yoerg.net"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <element name="sendPurchaseOrder" type="tns:sendPORequest"/>
    <element name="correlations" type="tns:correlationset"/>
    <element name="portType" type="xsd:string"/>
    <element name="partnerLink" type="xsd:string"/>
    <element name="sendSchedule" type="tns:sendScheduleRequest"/>
    <element name="sendInvoice" type="tns:sendInvoiceRequest"/>
    <complexType name="correlationsetvalues">
    <sequence>
    <element name="PurchaseOrderNumber" type="xsd:string"/>
    <element name="customerID" type="xsd:string"/>
    </sequence>
    </complexType>
    <complexType name="correlationset">
    <sequence>
    <element name="PurchaseOrder" type="tns:correlationsetvalues"/>
    </sequence>
    </complexType>
    <complexType name="sendPORequest">
    <sequence>
    <element name="customerId" type="xsd:long"/>
    <element name="purchaseOrderNumber" type="xsd:long"/>
    <element name="productId" type="xsd:long"/>
    <element name="quantity" type="xsd:int"/>
    </sequence>
    </complexType>
    <complexType name="sendScheduleRequest">
    <sequence>
    <element name="shipDate" type="xsd:dateTime"/>
    <element name="customerId" type="xsd:long"/>
    <element name="purchaseOrderNumber" type="xsd:long"/>
    </sequence>
    </complexType>
    <complexType name="sendInvoiceRequest">
    <sequence>
    <element name="price" type="xsd:double"/>
    <element name="customerId" type="xsd:long"/>
    <element name="purchaseOrderNumber" type="xsd:long"/>
    </sequence>
    </complexType>
    </schema>
    </types>
    <message name="newMessage">
    <part element="tns:sendPurchaseOrder" name="sendPurchaseOrderBody"/>
    <part element="tns:correlations" name="correlationsBody"/>
    <part element="tns:portType" name="portTypeBody"/>
    <part element="tns:partnerLink" name="partnerLinkBody"/>
    </message>
    <message name="sendPurchaseOrderResponseMessage"/>
    <message name="sendScheduleRequestMessage">
    <part element="tns:sendSchedule" name="sendScheduleBody"/>
    <part element="tns:correlations" name="correlationBody"/>
    <part element="tns:portType" name="portTypeBody"/>
    <part element="tns:partnerLink" name="partnerLinkBody"/>
    </message>
    <message name="sendInvoiceRequestMessage">
    <part element="tns:sendInvoice" name="sendInvoiceBody"/>
    <part element="tns:correlations" name="correlationsBody"/>
    <part element="tns:portType" name="portTypeBody"/>
    <part element="tns:partnerLink" name="partnerLinkBody"/>
    </message>
    <portType name="purchaseOrderPortType">
    <operation name="sendMyPurchaseOrder">
    <input message="tns:newMessage" name="sendPurchaseOrderRequest"/>
    <output message="tns:sendPurchaseOrderResponseMessage"
    name="sendPurchaseOrderResponse"/>
    </operation>
    <operation name="sendMySchedule">
    <input message="tns:sendScheduleRequestMessage" name="sendMySchedule"/>
    </operation>
    <operation name="sendInvoice">
    <input message="tns:sendInvoiceRequestMessage" name="sendInvoice"/>
    </operation>
    </portType>
    <binding name="purchaseOrderSOAPBinding" type="tns:purchaseOrderPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="sendMyPurchaseOrder">
    <soap:operation soapAction="" style="document"/>
    <input name="sendPurchaseOrderRequest">
    <soap:body use="literal"/>
    </input>
    <output name="sendPurchaseOrderResponse">
    <soap:body use="literal"/>
    </output>
    </operation>
    <operation name="sendMySchedule">
    <soap:operation soapAction="" style="document"/>
    <input name="sendMySchedule">
    <soap:body use="literal"/>
    </input>
    </operation>
    <operation name="sendInvoice">
    <soap:operation soapAction="" style="document"/>
    <input name="sendInvoice">
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>
    <service name="ListenerServiceService">
    <port binding="tns:purchaseOrderSOAPBinding" name="ListenerService">
    <soap:address location="http://localhost:8080/axis/services/ListenerService"/>
    <http-conf:client/>
    <http-conf:server/>
    </port>
    </service>
    </definitions>
    End of desired WSDL*************************************************************************************

    Adding these statements solved the problem
    message1.setUndefined(false);
    message2.setUndefined(false);
    binding.setUndefined(false);
    operation.setUndefined(false);
    porttype.setUndefined(false);
    This is kind of weird because you explicitly define them thru API calls, and this call seems redundant.
    Chris Yoerg

  • Calling web service via utl_dbws with unbounded return values

    Hello, everyone.
    I'm trying to use utl_dbws to call web service from Oracle DB 10 g.
    WS has unbounded return value:
    <xs:element maxOccurs='unbounded' minOccurs='0' name='return' type='xs:string'/>
    I'm setting return paramter in web service call handler like this:
    sys.UTL_DBWS.set_return_type(l_h_service_call, cs_qname_type_string);
    and when I'm trying to call it from PL/SQL function I'm getting an error:
    ORA-29532: Java call terminated by uncaught Java exception:
    deserialization error: XML reader error: unexpected character content: "s2"
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 38
    I've tried to return values by out parameters and got the same exception.
    It looks like utl_dbws needs to know parameters count before calling.
    Have anyone succeded in getting arrays from Web Service call?
    This is a part of wsdl:
    <xs:complexType name='getProcessList'>
    <xs:sequence>
    <xs:element minOccurs='0' name='nameMask' type='xs:string'/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name='getProcessListResponse'>
    <xs:sequence>
    <xs:element maxOccurs='unbounded' minOccurs='0' name='return' type='xs:string'/>
    </xs:sequence>
    </xs:complexType>
    Throught SoapUI I can produce such kind of request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:proc="http://processmanager.argustelecom.ru/">
    <soapenv:Header/>
    <soapenv:Body>
    <proc:getProcessList>
    <processNameMask>*</processNameMask>
    </proc:getProcessList>
    </soapenv:Body>
    </soapenv:Envelope>
    and get a response:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <ns2:getProcessListResponse xmlns:ns2="http://processmanager.argustelecom.ru/">
    <return>s1</return>
    <return>s2</return>
    <return>s3</return>
    <return>s4</return>
    </ns2:getProcessListResponse>
    </env:Body>
    </env:Envelope>
    PL/SQL function:
    DECLARE
    cs_qname_type_string CONSTANT sys.UTL_DBWS.qname
    := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'string') ;
    cs_qname_type_int CONSTANT sys.UTL_DBWS.qname := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'int');
    cs_qname_type_any CONSTANT sys.UTL_DBWS.qname
    := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'anyType') ;
    cs_endpoint CONSTANT VARCHAR2(256) := 'http://server:8080/process-manager/ProcessManager';
    l_service sys.UTL_DBWS.service;
    l_service_qname sys.UTL_DBWS.qname;
    l_port_qname sys.UTL_DBWS.qname;
    l_operation_qname sys.UTL_DBWS.qname;
    l_h_service_call sys.UTL_DBWS.call;
    l_params sys.UTL_DBWS.anydata_list;
    l_ret_val SYS.ANYDATA;
    BEGIN
    l_service_qname := sys.UTL_DBWS.to_qname(NULL, 'ProcessManagerService');
    l_service := sys.UTL_DBWS.create_service(l_service_qname);
    l_port_qname := sys.UTL_DBWS.to_qname(NULL, 'ProcessListServiceBinding');
    l_operation_qname := sys.UTL_DBWS.to_qname('http://processmanager.argustelecom.ru/', 'getProcessList');
    l_h_service_call := sys.UTL_DBWS.create_call(l_service, l_port_qname, l_operation_qname);
    sys.UTL_DBWS.set_target_endpoint_address(l_h_service_call, cs_endpoint);
    -- return type
    sys.UTL_DBWS.set_return_type(l_h_service_call, cs_qname_type_any);
    -- param type
    sys.UTL_DBWS.ADD_PARAMETER(l_h_service_call, 'processNameMask', cs_qname_type_string, 'ParameterMode.IN');
    l_params(1) := anydata.convertvarchar2('*');
    l_ret_val := sys.UTL_DBWS.invoke(l_h_service_call, l_params);
    IF l_ret_val IS NULL THEN
    DBMS_OUTPUT.put_line('l_ret_val is null');
    ELSE
    DBMS_OUTPUT.put_line('l_ret_val is not null');
    END IF;
    sys.UTL_DBWS.release_call(l_h_service_call);
    END;
    Edited by: Ilya on 03.12.2008 3:50

    Hi Tony
    I'm not sure if you would have solved your problem by now, but with my recent experience with the utl_dbws package, for doc lits with complex data types, you have to call the service with an XML request, as opposed to passing the param array.
    If you still need details, reply accordingly.
    Ta
    cT

  • How to access  complex data type from a soap web services?

    hello
    can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
    Jdeveloper generates 3 classes
    serviceStub
    getproperties
    response
    i have to retreview the data which is a complex data type it gives some
    unknown type. and the return value is a key-value pair data type .
    regards
    vs

    After you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.

  • Apex, Web Services, and complex data types?

    Hi all,
    I was wondering if somebody could explain to me what sort of support apex has for using web services with complex data types, and how data returned like this could be interpreted and stored in the database.
    Any help would be aprreciated.
    Thankyou in advance

    Hi can anyone help me with this?

  • Web Services Complex Data Type Query

    Newbie trying to understand how to work with Complex Data
    Type. Came across the following example in the Dev Guide
    What is wrong with Client Code? What am I missing?
    Please help
    Thanks
    Prashanth

    And That's what I did.
    name.cfc is the component that has complex data types
    created.

  • Help: consuming an external web service with user name token

    Hello Together!
    I need to consume an external web service secured with WS-UserNameToken. The way, how did I do it:
    1. I generated a web service consumer (proxy) in SE80 from the wsdl file
    2. I created logical port for the consumer in SOAMANAGER
    3. I created security profile in WSSPROFILE with telpmate SET_USERNAME and assigned it to consumer operation in LPCONFIG  (I use LPCONFIG, because I didn't find any way to do it in SOAMANAGER)
    3. I called the web service and got the error back:  session token is missing or invalid or has inspired
    My questions are:
    1. is this possible to consume an external webservice in SAP, which is secured with WS-Usernametoken?
    2. do I need therefore any settings in java stack? do I need java stack in general?
    3. Is this any way to configure the consumer without writing programs, which set header parameter manually?
    4. if the answer on the third question is no, do you have any examples, how to implement session management in report? (I mean sending session id and checking the validaty of id)
    I appriciate any help of you!
    best regards Anna

    Hi,
    it should be possible to use WS-UserNameToken for consuming web service. It should be available on AS BAP 7.0 and higher. This profile should be under category Document authentication. You can try to dump a message send from SAP to see what is going out of SAP. This should be supported in ABAP so you don't need a Java stack. What exactly do you want to configure? Do you want to just set user name and password for that service which will be used for any calls of that proxy?
    Cheers

  • Consuming Java Web Service with complex return types

    Hi,
    I'm consuming a Java Web Service and the return I get in
    ColdFusion is a typed Java Object (with custom Java classes like
    com.company.project.JavaClass ...)
    Within this object I don't get direct accessible properties
    as when I'm consuming ColdFusion Web Services, instead I get a
    getPROPERTYNAME and setPROPERTYNAME method for each property.
    How can I handle this? I don't want to call this methods for
    each property (and there are nested objects with arrays of custom
    classes below, which would really make this complicated).
    What's the best way to cope up with this?
    Thanks a lot,
    Fritz

    The web service is actually the function, not the cfc and you
    didn't show a function.
    My own opinion is that since webservices by definition should
    be available to any calling app (cold fusion, .net, flash, etc),
    whatever gets returned from the method should be as universally
    recognizable as possible. This generally means text, numbers,
    boolean, or xml.

  • Consume an external web service with an ABAP proxy

    Hello,
    I'm working on creating an ABAP Proxy to consume my first web service.  In searching SCN I haven't found a comprehensive list of steps to complete the process, but I have found information on generating a proxy from a WSDL and creating a logical port.
    My first issue arises when I go to SPROXY to generate a proxy from a WSDL, I see the message 'Local objects only (No Connection to ESR)', and I have no ability to 'create'.  The Enterprise Service Repository seems to be the new name for the Integration Repository, if that helps.  Do I need the ESR installed to create a proxy?
    A follow-on question, assuming I do need the ESR, would be what do I do with it?  It appears to serve the purpose of design for interfaces, messages, and mapping, but I thought that happened when I created a proxy in SPROXY.
    We're on ECC 6.0, with a 702 / 0007 basis release.  I appreciate and light you can shed on the topic.
    Thanks

    ESR is part of the PI system, and it is where all interfaces details are stored.You could create an ABAP Proxy from a pre-defined WDSL yet stored in PI as part of some communication, but you can also import directly a WSDL from a local file or even from a URL.
    ABAP proxy generates a proxy class and a set of abap structures , fields and data elements. Simply by filling the data and call a method in the proxy class (depends of syncrhonization a different method name) you can consume your service. No PI is needed if you use the local option.
    There is a very good Tutorial from Thomas Jung. I'll try to find it.
    http://scn.sap.com/people/thomas.jung/blog/2005/05/13/calling-webservices-from-abap-via-https
    Here you have a lot of tutorials
    Best regards

Maybe you are looking for

  • FND_REQUEST.SUBMIT_REQUEST is not working in After Report Trigger Reports6i

    Hi Guys, I am calling the another conc program in After report trigger using FND_REQUEST.SUBMIT_REQUEST. The below are the statement which i use in my program. req_id := FND_REQUEST.SUBMIT_REQUEST('APPL_SHORT','CONC_SHORT',NULL,NULL,FALSE); I have al

  • Upgrading to 11.1.1.2, registry.xml not found and oracle_common not found

    We are running OFM 11.1.1.1, with the OID component only (and no weblogic domain). We're trying to upgrade to 11.1.1.2, and when running the ant master-patch-schema command, we're getting the following errors: validate-file-exists: [echo] Error: ** f

  • XML ACTION TAG "CREATE"

    Dear Experts By the method mentioned below I able to extract the data in <b>XML format</b>.. XML Conversion CALL TRANSFORMATION id SOURCE output = it_pernr RESULT XML xml_out. APPEND xml_out TO xmltable . But the applicaton where I need to upload thi

  • Time Machine Error Message: "sparsbundle could not be accessed (error-1)

    hi, I am running snow leopard on my iMac and have a mac mini connected via ethernet running Mac Leopard Server version 10.6. I backed up my iMac onto my Mac Leopard Server using Time Machine about a year ago and then I turned it off and haven't done

  • Parition Value of Null Converted to 0

    Hello I have some field values like weight and volume that I want to map to a product table field of type measurement.  The problem is the source data contains null null or 0.00 null. Import manager forces converting the nulls to 0, else can not exec