Difficulty Defining WSDL

Hi guys,
My work has come to a bit of a stand still because I am trying to define a complex data type that I cannot seem to describe in a wsdl. I'm new to web services so I bear with me if this doesn't come out right.
I'm using axis2 to build my web services, which adheres to the SOAP specification. Now, I want my SOAP service to be as simple to use as possible. If I understand correctly, SOAP is just transfer of xml data between two services. Axis2 uses many different implementations to achieve this transfer both on client and server side, e.g, ADB, XMLBeans, AXIOM. The last implementation, AXIOM, parses the XML directly. The other implementations encapsulate the processing of this XML and this allows you to create a web service without the need to directly parse the xml message for data.
I am trying to build a service with a simple request but a more complicated response. For example; I want to send the parameters; accountNumber, name. And I want my service to response with the following parameters; product1{name,price},product2{name,price}....In addition, I want to be able to send a response code so that every time I send a service call I am giving some indication as to whether or not the call was successful. For example if the call was successful than the response code is 0, if something went wrong the response code is 1. If I try to represent that using SOAP, I'm assuming the xml messages will look like this;
request;
<request>
   <customer>
     <accountNumber>S3</accountNumber>
     <name>Solid Snake</name>
   </cusomer>
</request>response;
<response>
   <responseCode>1</responseCode>
   <product1>
      <name>Ration</name>
      <price>1.00</price>
   </product1>
   <product2>
      <name>CardboardBox</name>
      <price>1.00</price>
   </product2>
</response>Follow so far?
I have created the service using AXIOM, by adding these nodes directly to the SOAP body content. I have all also created a client to deal with this service using AXIOM. The service has one method that accepts the SOAP message and parses it to get the data and the client does something similar.
Now the problem I have is that I don't want my client to be dependent on any implementation. In other words I want the client to be able to use ADB or XML Beans or whatever, regardless of whether or not I use AXIOM. So I thought I would create a custom WSDL, with custom complex datatypes so that anyone generating code from the wsdl will be able send the correct parameters. Confused? Okay lets look at a simple request-response;
<request>
   <number1>23</number1>
   <number2>24</number2>
</request> <response>
   <result>47</result>
</response> This service will take two numbers as its argument and add them together. Now i'm guessing here, but i think the wsdl will look something like this;
<message name="addRequest">
   <part name="number1" type="xs:int"/>
   <part name="number2" type="xs:int"/
</message>
<message name="addResponse">
   <part name="result" type="xs:int"/>
</message>
<portType name="glossaryAdd">
  <operation name="add">
      <input message="addRequest"/>
      <output message="addResponse"/>
  </operation>
</portType>
...Given the above, assuming its all correct, my question is; how do I create the wsdl for the more complex example above?

  <xs:complexType name="product">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="price" type="xs:double"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="products">
    <xs:sequence>
      <xs:element name="product" type="product" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

Similar Messages

  • Defined WSDL in ID is not accepted

    Hello,
    i have created a wsdl by the wizzard define WS in the integration directory.
    the wsdl is working fine with xml spy an the soap sender adapter.
    but when we try to import the wsdl into the SAP NetWeaver Composition Environment we get the following error
    java.io.IOEXCEPTION: Invalid content type while requesting .... Expected Content-type: text/xml, received Content-type: content/unknown.
    Has anyone an idea how I can modify my wsdl or create an correct one that is accept by  SAP NetWeaver Composition Environment?
    THX for answer
    Kind Regards Johann

    Hi Johann,
    Try to change the content type to application     xt from applicationxml then try once again.
    Plz do refer the following blog:
    Troubleshooting - RFC and SOAP scenarios *** Updated on 20/04/2009 ***
    Please take a look at SAP Note No: 856597. Should be helpful.
    Could you check with TCPGateway, what error is sent back?
    Troubleshooting SOAP, HTTP and Mail Adapter Scenarios with TCPGateway
    Regards,
    Vinod.

  • Error after import external webservice(RFC) wsdl url to Process Composer

    Hi all,
    I try to use RFC webservice in my BPM as below:
    1. Expose RFC as webservice using CAF (import external service RFC and then create application service use this external service)
    2. Define Destination in NWA.
    3. Create a Process Composer project, and import the external webservice(RFC) wsdl file as service interface in the project.
    After importing, i get error : the port type specified for the ...binding is undefined. Check port type name and ensure it is defined.
    If i import another external service, not RFC (such as business object), there is no error.
    My system is NWCE 7.11
    Thanks in advance,
    Sinh.
    Edited by: Sinh Nguyen Van on Jul 20, 2009 8:29 AM

    Hi Bharath,
    Below is content of wsdl url and error message, thanks
    Error message:
    The 'zfm_rfc_caf_as' port type specified for the 'zfm_rfc_caf_asBinding' binding is undefined. Check the 'zfm_rfc_caf_as' port type name and ensure it is defined.
    wsdl url :
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.sap.com/caf/demo.sap.com/s00_caf_rfc/modeled/zfm_rfc_caf_as" xmlns:b0="http://www.sap.com/caf/demo.sap.com/s00_caf_rfc/modeled/zfm_rfc_caf_as">
      <import namespace="http://www.sap.com/caf/demo.sap.com/s00_caf_rfc/modeled/zfm_rfc_caf_as" location="http://sinhnv-lap:50000/zfm_rfc_caf_as/zfm_rfc_caf_asBeanImpl?wsdl=binding&mode=ws_policy" />
    - <service name="zfm_rfc_caf_as">
    - <port name="zfm_rfc_caf_asBindingPort" binding="b0:zfm_rfc_caf_asBinding">
      <address xmlns="http://schemas.xmlsoap.org/wsdl/soap/" location="http://sinhnv-lap:50000/zfm_rfc_caf_as/zfm_rfc_caf_asBeanImpl" />
      </port>
      </service>
      </definitions>
    Edited by: Sinh Nguyen Van on Jul 22, 2009 4:18 AM

  • Handle WSDL data connection timeout during PDF generation

         I have created in LiveCycle Designer XDP template. In template i defined WSDL Data connection. For data loading i call xfa.connectionSet.WsDataConnection.execute(0).
         For PDF generation i created LiveCylce process and use generatePDFOutput component.
    If WebService works output service generates document with all data - OK.
    If i turn off webservice and run process ouputservice generates PDF document with empty fields. Is where any possibility to raise execption to calling process if WSDL connection timeouts or gives SOAP fault error in response? 
    I want catch web service errors in process and do not generate PDF if some webservice used in PDF template is not accesible during generation.

    Hi Martin,
    We are experiencing the same issue with SAP/Vertex. Can you let me know how you resolve this? Did you change the SAP gateway timeout parameter? If so, which one is it?
    Your help on this is greatly appreciated.
    Thanks much!
    Best regards,
    Cyanna

  • How do we expose the WSDL

    Hi,
    I have created a WSDL from ID ( tools > define WS ) and I could able to fire Web service from Altova's XML SPY.
    But when I try to fire the Web service from WSNavigator, it says
    "Message Servlet is in Status OK
    Status information:"
    1. How do I expose the WSDL created through XI so that if I place the CC link in URL of the web page, it will pop up the WSDL ( in my local network, atleast)?
    Regards,
    Nikhil.

    Hello Nikil,
    Exposing Web Services as Callable Objects
    Use
    Web services are Web interfaces that are based on open and commonly accepted standards and can be integrated into a company’s business scenarios. Using Web services enables you to combine functions implemented in different software components into a single process.
    You can expose any web service as a callable object using Guided Procedures (GP) design time. The integration into the GP framework is done transparently by the system.
    To expose the function module as a callable object, you must use the wizard that GP design time provides.
    Currently Web Service callable objects support the following SOAP encoding styles:
    §         SOAP Remote Procedure Call Literal encoding (SOAP RPC-literal)
    §         SOAP document-style encoding, which is also known as message-style or document-literal encoding
    Prerequisites
    ·        You have created and configured a logical destination to access the required Web services.
    See Configuring Logical Destinations for WS Callable Objects.
    ·        You need to know a precise WSDL URL for internal or external Web services that do not require authentication.
    Procedure
           1.      Open the gallery and choose Create Callable Object from the contextual panel.
           2.      Enter the required basic data as follows:
    Parameter
    Description
    Type
    Choose Service ® Web Service.
    Name
    Enter a name that is used to distinguish the callable object in the gallery. You are not required to use a unique name for the callable object.
    Description
    Describe the callable object by entering a brief description of its functions.
    Original Language
    Select the original language in which the callable object is being created.
    Folder
    Select the folder where the callable object is stored.
    You can either use an existing folder, or create a new one.
           3.      To open the Define Object screen, choose Next.
    You can choose one of the following options:
    Option
    Description
    Configuration
    Case 1: WDSL URL Select
    WSDL URL
    You use this option when you want to call internal or external Web services that do not require any security information.
    If you are behind a proxy and you want to call an external service, then you should configure your proxy in the Visual Administrator, in the Web Service Container settings.
    Enter a string that defines the WSDL URL and press ENTER.
    Case 2: Logical Destination Select
    Logical Destination
    You use this option when you want to:
    ·        Choose from a set of previously defined WSDL files
    ·        Call Web services that need authentication.
    ·        Call ABAP Web services.
    To be able to choose a logical destination, you should have created one. For more information, see Configuring Logical Destinations for WS Callable Objects.
    To open the configuration screen, choose Select.
                                a.      From the Destination dropdown box, select a Web service destination.
                                b.      You can search for logical destination interfaces by namespace or by pattern.
                                c.      Choose Search.
    The list with the logical destination interfaces appears below.
                                d.      Select an interface.
                                e.      To view details about the selected interface, set the Show Additional Info indicator on the right.
                                  f.      Choose Accept.
           4.      On the Web Service Properties screen, select one of the following:
    &#9675;       A port from the Interface Port Name dropdown box
    &#9675;       A logical destination (if any)  from the Logical Destination Endpoint dropdown box.
           5.      From the list with the available interface operations, choose an operation.
    The operation parameters are displayed in the right-hand part of the screen.
    For each particular Web service, different operations are available, for example:
    &#9632;       StartProcess is an operation defined for the GPProcessDiscoveryWSIL Web service. It creates an instance of a process template.
    For more information, see Consuming the GPProcessDiscovery Web Services.
    &#9632;       CompleteAction is defined for the GPActionDiscoveryWSIL Web service and completes a process step.
    For more information, see Consuming the GPActionDiscoveryWSIL Web Service.
           6.      To open the Define Input screen, choose Next
    The input parameters of the web service are automatically detected.
           7.      To open the Define Output screen, choose Next.
    The output parameters of the web service are automatically detected
           8.      Choose Next, and then Finish and Open.
    The callable object design time opens. You can edit the object definition here.
    In case of a change in the definition of the Web service you have exposed, you can update the existing callable object through the GP design time. On the Object Definition tab page, choose Update to update input, output, configuration parameters, result states, and exceptions defined for the selected operation.
    To check for parameter compatibility, choose Check.
           9.      To activate the object, choose (Activate). 
    Example
    For an example of exposing a Web service as a callable object, see Importing a Web Service in Guided Procedures.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0fe13f0-0e56-2910-bcb1-cbd79c8f122c
    http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/sap_xi/sapximst50.htm
    http://www.riyaz.net/blog/index.php/2007/12/10/xipi-consuming-xi-web-services-using-web-dynpro-part-i/
    Thanks,
    Satya Kuamr..

  • Outside-in service implementation from WSDL file for CAF and WS consumption

    Hi All,
    I'm having one of those weeks and struggling to get my head around a problem I have...
    I'm working on a CE 7.2 system (with no ESR as it's only a demo at the moment) with an SOA architect to deliver some demo capability for a customer.  The architect is defining contracts for services we plan to implement on the CE system and supplying them to me as a bundle of .wsdl and .xsd files.
    I am trying to import these service contracts into my NWDS with the intention of implementing the logic behind them and then deploying the services to the CE system.  I can then consume those services in Composite Apps, whilst other areas of the business can consume them direct as web services.  Unfortunately, I've hit a brick wall and can't figure out how to achieve this.
    Ordinarily I would create a CAF modelled app service based on an RFC or WSDL and then generate and deploy that but in this case, we want to define the WSDL first and then implement the logic behind it, ensuring the resultant service deployed to the CE runtime complies to the pre-defined service contract.
    So, can anyone suggest how I go about this?  I feel like I'm missing something really obvious but just can't seem to get going with this.
    Thanks in advance,
    Gareth.

    Ok, been doing some more reading, thinking and testing.
    Am I correct in thinking the only way to use this outside-in approach is to have the ESR activated on CE.  My SOA architect can then define the service interface/contract in the ESR, and I can then import this into NWDS and build the implementation?
    I'm trying to get to a point where a CAF implemented application complies with a pre-defined WSDL definition but I really don't think this is possible actually.
    Gareth.

  • Generating wsdl:fault with Oracle Web Services

    What conditions are required to have Oracle Web Services throw a defined wsdl:fault over a soap:fault? Is there documentation on how to map these correctly from your java code? I can't seem to find anything in the documenation that discusses this and when using the WebServiceAssembler to generate WSDLs including an exception in a method signature does nothing to generate a wsdl section in the generated portType.
    Any pointers are appreciated.

    Hi,
    If a method throws Exceptions that are not instances / subclasses of java.rmi.RemoteException, then it's not a SOAP Fault, but a wsdl:fault. This is the manner in which JAX-RPC handles the Exceptions.
    Regards,
    Sandeep

  • Web services references problem:  WSDL document was unretrievable

    I've tried to add a web service reference to my application. I followed the examples given in the user guide, but none of the web services are available. (IBM and Xmethods). I also tried the bookstore application from the studio (http://soap.amazon.com/onca/soap3), it didn't work either.
    Error message:
    "The WSDL document was unretrievable because either the URL you supplied was invalid, or your environment requires a valid proxy server address for HTTP requests and you have not defined one for this application."
    I am wondering perhaps I have to setup in somewhere such as proxy server (I don't use proxy for internet browsing though) to be able to use webservices.
    May somebody with htmldb webservice experiences shed some light on this?
    Thanks in advance.

    Thanks for the information Eric.
    I donot want to use Axis because Axis doesn't allow me to configure XMLBeans for serialization and deserialization. I am using XMLBeans to prepare my response in XML form.
    I am using XSDs to define my input and output XML structure. This way Client applications can use this XSD to build the input XML and to validate the output XML that they get from web service. I also defined WSDL on my own (using some editors)which will make use of these XSDs to
    define request and response. I wrote my own ANT script which will do the same processing as WebServiceAssembler.
    EAR file that is generated by my ANT script is working fine.. I was able to send the request and get the response from webservice.
    Now I have realized that Oracle is NOT doing the input and output validation eventhough I have specified my input and ouput XSD in WSDL. I can send any 'format' of XML input to my webservice and get any 'format' of XML output, which is NOT GOOD. Is there anyway that I can force Oracle to do the input XML and output XML validation ? or it has to be handled by developer?
    Sorry for long mail.
    Thanks for your time, Kiran

  • Create logical file path and read it in main program

    Hello Experts,
    My requirement is, I have to read files from application server.
    File path/ Directory is different in different system (systid). i have to read all files starting with (xyz*) from mentioned directory.
    This path i must define in logical path.
    Following are the steps i followed.
    1)   In FILE (TCODE) i have created a logical path and assigned a physical path to it.
    2)   I have created logical file ( I am not sure about this, as i dont have to create logical file, i just need to read file from above path starting with xyz*,  but FM FILE_GET_NAME requires logical file name so i have created it).
    3) I will pass logical file name to FM FILE_GET_NAME and recieve physical file path(with file name which i can ignore).
    these all steps i found on SDN. but its not working.
    FM FILE_GET_NAME is always returning same file path ( Not even close to what i have defined ).
    I can not read data from Table path as it will return physical path as it is, but i need it replaced with system id.
    Any suggestion will be really helpful.
    Thanks in Advance.
    Regards,
    Amar

    Hi Amar,
    one difficulty defining physical path name is to know the right Syntax group.
    For example if you habe OS Linux, you need Syntax Group UNIX here. In Table OPSYSTEM you can see, which OS (OPSYS) needs which FILESYS (Syntax Group).
    If you always get a wrong physical path, this may be caused ba a wrong choice of the Syntax Group. Only the correct one will lead to the correct path.
    Regards,
    Klaus

  • Use AQ Adapter Header Message ID Value in BPEL Process

    Hi guys,
    I'm trying to obtain the value of the message_id in a header variable created in a receive branch activity linked to an AQ Adapter, i've created the variable in the adapter tab of the receive activity and linked the message type variable with the InBound WSDL of the header. I want to use this message_id value obtained in the dequeue operation to set as correlation_id in a future enqueue. The question is, when i do a copy operation in an assign activity of the message_id in the first header variable (dequeue) to the second header variable (enqueue) the BPEL raises an error telling me that the variable was empty, can you help me with this? Am i doing the whole thing wrong? I'm using the 10g version on R3.
    Thanks a lot!

    Hi Anuj,
    I selected "Receive" while configuring B2B adapter. While creating the BPEL process to receive the message, i have created it as Empty BPEL process "Define WSDL later". Then i configured the B2B adapter. In the Empty BPEL process i place a receive activity and wire the B2B adapter. Operation available in Receive activity is "Receive". I'm i configuring wrongly?
    Thanks,
    Terry

  • Problem with XML Deserialization Error

    Hi! when I test my webservice, I take the following error: Deserializing fails. Nested message: XML Deserialization Error. Result class com.sap.gram.SelRec.SelRec_CompGenModel does not have property of type java.lang.String. It is required to load XML..
    I don´t understand why occur this!! CiEntId is a string with the property of a primaryKey
    What can I do??
    Thanks
    Rose

    Hi Rosa,
    I've got the same error message, but in another scenario. I'm testing a XI Web Service, with a defined WSDL. To test it I'm using WS Navigator (http://host:port/wsnavigator/enterwsdl.html). Although all the types I'm returning are on the WSLD definition, the dumb WS Navigator fires the "XML Deserialization Error", and says that a type is not defined in the wsdl (but the type is there, and other test tools are working fine with it!).
    roberti

  • XMII Result Output Scenario

    I have 3 Machines
    1) Web Server (Running Tomcat Server, Open to Public)
    2) xMII Server (Open to Web Server)
    2) SQL Database (Open to Both Web & xMII Server)
    I have created a dashboard on xMII Server using data stored in SQL Server. Now, I want this data to be available to public i.e. there should be some mechanism through which I can display the data on my web server. (I mean if i copy certain class file, i get the thing working on web server itself).
    Is it possible?

    Claude
    Though it is possible, i nvr tried this out. u may try this out by creating a <b>webservice</b> with xMII-based dashboard using Business Logic Services. then use that created web-service in the web server for the data from xMII to be displayed on the web server.
    Just try this as follows as for reference out if possible
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0e74673-718f-2910-c4a7-bbae959d1e5a
    Here first few steps will help u to create/generate a webservice with defined WSDL, then from Web Server u can import that defined WSDL file (webservice model)
    Regards
    Som

  • Core Web Services: Definition of...

    Hi there,
    I'm not a native English speaker, so I'm having a hard time trying to translate the word 'endpoint'.
    W3C defines WSDL as "an XML format for describing network services as a set of ENDPOINTS operating on messages containing either document-oriented or procedure-oriented information..."
    The definition uses the word 'endpoint' several times.
    Could anyone help me here, by defining it, in a clear way?

    A web service "endpoint" is a URL that identifies the server host/port and web app. that services calls to a particular web service ... at least that's what it is in practice when the web service is implemented in Java using toolkits such as Axis and JWSDP.

  • Simple Client for web service ...Perl way

    II need to get information from a web service (with a defined WSDL)...I have been able to do that with Perl ((using SOAP:Lite) which is pretty staight forward....
    I was trying to do the same with Java ..I tried to find tutorials ...but was overwhelmed with the amount of information ..in there .(They talk about writing the server installing axis etc ..but fail interms of a simple explanation to create a simple client
    I was wondering if you could help me to get hold of a tutorial/resource which helps in simply creating a connection and getting information from the remote application...

    hi
    writing webservices using tomcat and axis is pretty easy ..... you have to create a java class to describe your service .... and save it in the axis subdirectory of tomcat .... and call the service from a client on a remote machine using the IP address and port details ...

  • Get HTML page content as string in BPEL

    Hi!
    I would like to get HTML page content as string in BPEL via partnerLink.
    So, I define WSDL file for this partnerLink:
    <definitions targetNamespace="urn:GetSummaryContent"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:GetSummaryContent"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/">
    <message name="MarkMessageAsReadHttpGetIn">
    <part name="webid" type="xsd:string"/>
    </message>
    <message name="MarkMessageAsReadHttpGetOut">
    <part name="Body" type="xsd:anyType"/>
    </message>
    <portType name="getHtmlPageGet">
    <operation name="getHtmlPage">
    <input message="tns:MarkMessageAsReadHttpGetIn"/>
    <output message="tns:MarkMessageAsReadHttpGetOut"/>
    </operation>
    </portType>
    <binding name="MessagingHttpGet" type="tns:getHtmlPageGet">
    <http:binding verb="GET"/>
    <operation name="getHtmlPage">
    <http:operation location=""/>
    <input>
    <http:urlEncoded/>
    </input>
    <output>
    <mime:content type="text/html" part="Body"/>
    </output>
    </operation>
    </binding>
    <service name="Messaging">
    <port name="MessagingHttpGet" binding="tns:MessagingHttpGet">
    <http:address location="http://server:port/app-context-root/sss.xsql"/>
    </port>
    </service>
    </definitions>
    As a result I got bindingFault: [email protected]9b : Could not find binding output for operation getHtmlPage
    Could You help me to solve this trouble?
    Have You any solution?
    Thank You.

    What are you trying to accomplish?

Maybe you are looking for