webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Webservice Provider

  • 1.  Webservice Provider

    Posted Tue February 21, 2017 04:59 AM

    Hi,

    We have a provider WSDL from client as below. It has namespace with prefix urn.

    <?xml version="1.0" encoding="UTF-8"?>

    <wsdl:definitions targetNamespace=“urn:Integration_Request_R8A” xmlns:s0=“urn:Integration_Request_R8A” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:wsdl=“http://schemas.xmlsoap.org/wsdl/” xmlns:xsd=“XML Schema”>
    wsdl:types
    <xsd:schema elementFormDefault=“qualified” targetNamespace=“urn:Integration_Request_R8A”>
    <xsd:element name=“CreateInterfaceRequest” type=“s0:CreateInputMap”/>
    <xsd:complexType name=“CreateInputMap”>
    xsd:sequence
    <xsd:element minOccurs=“0” name=“Destination_Object” type=“xsd:string”/>
    <xsd:element minOccurs=“0” name=“Dest_ObjectID” type=“xsd:string”/>
    <xsd:element minOccurs=“0” name=“Destination” type=“xsd:string”/>

    So will sending the request the attribute needs to be prefixed with urn. like: urn:Destination_Objectabc</urn:Destination_Object>
    If we do not send urn prefix then corresponding attribute cannot be fetched.

    Is it possible to use same WSDL and send without prefix urn in the request.
    Is there any setting which I can make.

    Please advise.

    Thanks,
    Monica


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Webservice Provider

    Posted Tue February 21, 2017 07:20 AM

    Hi Monica,

    You can edit the WSDL and change the below setting as “unqualified”
    <xsd:schema elementFormDefault=“qualified” targetNamespace=“urn:Integration_Request_R8A”>

    I will remove the namespace from your WSDL file at both side. i.e. request/response.

    Regards,
    Syed Faraz Ahmed


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Webservice Provider

    Posted Tue February 21, 2017 07:59 AM

    Hi Syed,
    I have tried that and it works. Is there a way which can be achieved without WSDL change. Client does not want to change WSDL

    Thanks,
    Monica


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Webservice Provider

    Posted Wed February 22, 2017 07:26 AM

    Hi Monica,

    At the time of consuming Webservice, you will get an option to change the namespace.

    Regards,
    Syed Faraz Ahmed


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Webservice Provider

    Posted Wed February 22, 2017 07:32 AM

    Hi Syed,

    Namespace cannot be changed/removed. Only prefix can be changed.

    Thanks,
    Monica


    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Webservice Provider

    Posted Wed February 22, 2017 08:03 AM

    Hi Monica,

    I meant the same. I mentioned we can change the namespace(Prefix).

    From your first message, i could get that you want to remove the prefix and send the request? Am I correct?
    If such is the case then while sending the request you can use a regular expression and remove the prefix from the document and send it.

    Regards,
    Syed Faraz Ahmed


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Webservice Provider

    Posted Thu February 23, 2017 12:43 AM

    Hi Syed,

    Thanks for the input.
    When the WSDL is imported to designer, it has created the i/p and o/p with prefix.
    When customer sends the request they will not send the prefix.
    So in my flow service, request will not reach if they do not send with prefix.
    What step do I need to add in flow service to achieve this.

    Is there a way to handle with and without prefix with the same WSDL.

    Please suggest.

    Thanks,
    Monica


    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Webservice Provider

    Posted Thu February 23, 2017 03:34 AM

    Hi Monica,

    When the client has shared the WSDL with Namespace then they should send all the requests with the namespace is there any specific reason they are not doing so?

    Anyways what you can try is create a duplicate document for input with similar structure (Remove Namespace prefix for this document) as that of the generated one(with Namespace) and include it into the connector/service in place of the default generated one.

    I am not sure if this works but you can give it a try and update us.

    Regards,
    Syed Faraz Ahmed


    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Webservice Provider

    Posted Mon February 27, 2017 01:33 AM

    Hi Syed,

    So Conclusion is client should send the prefix with the request if they want to use the same WSDL or they should change the WSDL tag to “unspecified” if they do not want prefix.

    They cannot send both using one WSDL.

    Thanks for all your inputs.

    Regards,
    Monica


    #webMethods
    #Integration-Server-and-ESB