Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
21 replies Latest Post - ‏2014-01-29T15:19:32Z by kevinaCMG
shyenuganti
shyenuganti
40 Posts
ACCEPTED ANSWER

Pinned topic Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

‏2013-01-02T20:01:49Z |
Hi,

I am trying to call a Axis2 webservice from the webservice component of the IBM BPM 7.5.1 Advanced Edition. But I am encountering the exception:

Encountered an error while trying to discover services at "http://....". Please check the wsdl to make sure it is valid.

I am seeing the same issue with all the webservices that we have in use. All are Axis2 services. And these are working fine from a browser or soapUI.

What are the limitations of IBM BPM web service component? Does it have any known issues calling complex wsdl's or with any older versions of SOAP or anything that you know of?

Some one please help.

Thanks !

  • Sri Harsha Yenuganti
Updated on 2013-01-10T15:58:50Z at 2013-01-10T15:58:50Z by SystemAdmin
  • kolban
    kolban
    3315 Posts
    ACCEPTED ANSWER

    Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

    ‏2013-01-02T20:16:06Z  in response to shyenuganti
    What is the URL you are entering to discover the WSDL? Can you execute that in a browser and retrieve the WSDL? Can you post the WSDL that is returned?

    Neil
    • shyenuganti
      shyenuganti
      40 Posts
      ACCEPTED ANSWER

      Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

      ‏2013-01-02T20:22:15Z  in response to kolban
      Hi Kolban,

      This is an Axis2 web service. And I believe that Axis2 generates the wsdl on the fly when requested. And yes, this service is working from a browser and also from inside a soapUI, I am able to get responses even.

      The WSDL is attached.
      • kolban
        kolban
        3315 Posts
        ACCEPTED ANSWER

        Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

        ‏2013-01-02T20:48:43Z  in response to shyenuganti
        I took the WSDL you provided and tried to load it in Process Designer ... I got the error:

        Encountered an error while trying to discover services.
        :file:/C:/Users/kolban/AppData/Local/Temp/tw-schema-271688025553500684.xsd:file:/C:/Users/kolban/AppData/Local/Temp/tw-schema-271688025553500684.xsd::8:113:1230:src-resolve.4.2: Error resolving component 'ns3:NotificationMessage'. It was detected that 'ns3:NotificationMessage' is in namespace 'http://service.policyservices.thi.nationwide.com/xsd', but components from this namespace are not referenceable from schema document 'file:/C:/Users/kolban/AppData/Local/Temp/tw-schema-271688025553500684.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ns3:NotificationMessage' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/C:/Users/kolban/AppData/Local/Temp/tw-schema-271688025553500684.xsd'.

        Lots of text but the key phrase to me was about "NotificationMessage". I then loaded the WSDL in IID and ran its WSDL Checker against the file and got the error:

        NotificationMessage is unresolved

        I am not confident that the WSDL is correct as we now have two WSDL parses complaining over the same area.
        • shyenuganti
          shyenuganti
          40 Posts
          ACCEPTED ANSWER

          Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

          ‏2013-01-02T20:52:04Z  in response to kolban
          Hi Kolban, Thanks for that input. But Can I ask you one question. I will look into the issue. But still the service works fine with all other applications.

          Where are syou seeing this exact error? In the logs? Because I am seeing just the generic error not this specific error anywhere. When you load the WSDL in the process Designer, do you mean trying to discover the service from the webservice integration component?
          • kolban
            kolban
            3315 Posts
            ACCEPTED ANSWER

            Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

            ‏2013-01-02T21:05:34Z  in response to shyenuganti
            I am using IBM BPM 8.0 but the error is still the same. When I specify the URL of the WSDL and then click the discover button, an error dialog appears. When I click the "Details" button, then I see the details of the error. I then put Process Designer aside and loaded the WSDL manually into IBM Integration Designer. I opened the file in IBM's WSDL Editor and looked in the source view. I was directed to a line in the file which complained of an error.

            As for the WSDL working in other applications, I am at a loss to explain that. It could be that those applications are less sensitive to the error. Until we dig deeper and understand the exact nature of what the complaint is telling us, I'm not sure how to explain. My suggested approach would be to create a trivial new WSDL that uses only the data type that is giving us grief. I'd do this by starting with the current WSDL and stripping it down to bare minimums and see if that works. I am pretty sure it won't but now we have reduced the problem to a trivial example which we can then pour over. What development tools do you have that can validate WSDL? There appears to be a number on the web that you may wish to try.

            Neil
            • kevinaCMG
              kevinaCMG
              42 Posts
              ACCEPTED ANSWER

              Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

              ‏2014-01-29T15:19:32Z  in response to kolban

              BPM seems to throw errors at 50% of the WSDL files I have ever tried to feed it- I have no clue why. Same as shyenuganti, the WSDL files are heavily utilized by other applications, but BPM just never seems to be able to parse through them correctly. We've had to write our own web service code for BPM to utilize to get around these issues.

          • shyenuganti
            shyenuganti
            40 Posts
            ACCEPTED ANSWER

            Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

            ‏2013-01-02T21:05:54Z  in response to shyenuganti
            The "NotificationMessage" is a complex variable defined in the schema as follows:

            <xs:schema xmlns:ax27="http://underwritingreporting.common.apps.server/xsd" xmlns:ax23="http://mdb.idcards.business.common.server/xsd" xmlns:ax21="http://service.policyservices.thi.nationwide.com/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.policyservices.thi.nationwide.com/xsd">
            <xs:import namespace="http://mdb.idcards.business.common.server/xsd" />
            <xs:import namespace="http://underwritingreporting.common.apps.server/xsd" />
            • <xs:complexType name="NotificationMessage">
            • <xs:sequence>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="docQueueMessages" nillable="true" type="ns2:DocQueueMessage" />
            <xs:element minOccurs="0" name="message" nillable="true" type="xs:string" />
            <xs:element minOccurs="0" name="topic" nillable="true" type="xs:string" />
            <xs:element maxOccurs="unbounded" minOccurs="0" name="underwritingReportingMessages" nillable="true" type="ns1:UnderwritingReportingMessage" />
            </xs:sequence>
            </xs:complexType>
            </xs:schema>
            The target namespace is "targetNamespace="http://service.policyservices.thi.nationwide.com/xsd"

            The same target namespace is used in the WSDL as "xmlns:ns3="http://service.policyservices.thi.nationwide.com/xsd" and the complex variable is used as

            <xs:element minOccurs="0" name="param0" nillable="true" type="ns3:NotificationMessage" />

            inside another variable "msgNotify". So I see that the namespace is properly defined as per the schemas. Do you see an error here ?
            • shyenuganti
              shyenuganti
              40 Posts
              ACCEPTED ANSWER

              Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

              ‏2013-01-02T21:08:08Z  in response to shyenuganti
              I can use Eclipse with WTP plugin or a soapUI to start with.
              • shyenuganti
                shyenuganti
                40 Posts
                ACCEPTED ANSWER

                Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                ‏2013-01-02T21:09:46Z  in response to shyenuganti
                So you are able to see the more detailed error in BPM 8. In 7.5.1 it only says the generic issue and there is no link to DETAILS in the pop up. :(
                • shyenuganti
                  shyenuganti
                  40 Posts
                  ACCEPTED ANSWER

                  Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                  ‏2013-01-02T21:13:53Z  in response to shyenuganti
                  Probably we should have an import inside the schema where this "NotificationMessage" is used.But as I said, Apache Axis2 web services works a bit different where the WSDL is generated on the fly when requested. And I am not sure this Axis2 WSDL is WS-compliant. As this is an existing service, I cant change anything in it. Can we somehow tell BPM to ignore this ?
                  • kolban
                    kolban
                    3315 Posts
                    ACCEPTED ANSWER

                    Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                    ‏2013-01-02T21:23:36Z  in response to shyenuganti
                    Let us remember that the WSDL is a description language used by the engine to determine how to build a SOAP message for transmission. So the end goal is (under the covers) to be able to send a SOAP message understood by the recipient. If your deployed Web Service is "somehow" working but has generated WSDL that is "broken" as per the WSDL specification (not saying that it is or isn't ... but am taking that as a clue) then we, at first sight, appear to be stuck. If you give invalid input to a program, we shouldn't expect that program to work. However, we have a glimmer of hope. The WSDL data read by IBM BPM doesn't have to be the SAME WSDL that is served by the target Web Service. Assume that you have a deployed Web Service ... ServiceA. ServiceA supplies a WSDL file ... ServiceA.wsdl. Now assume that we can't or don't want to use that WSDL file. What we can do is take a copy of ServiceA.wsdl, make changes to it and then point Process Designer to the modified WSDL file. In Process Designer, we can change the endpoint to which the SOAP message will be delivered. Again, as long as IBM BPM sends a SOAP message that the recipient wants, the recipient doesn't really care HOW BPM built that SOAP message.

                    If it were me, I'd still dig deeper into the heritage of that WSDL and the error produced. If the WSDL does indeed contain an error, the correct steps would be to pin it down and look to correct it. Either the WSDL is "good" or it is "not good" from a parsing perspective. If the WSDL is "not good" but is 100% generated and there is nothing we can do about that generated WSDL, I'd look to the generators of the WSDL and ask "Why is this tool generating invalid WSDL?". Maybe it is a bug or a setting option.

                    Neil
                    • SystemAdmin
                      SystemAdmin
                      7615 Posts
                      ACCEPTED ANSWER

                      Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                      ‏2013-01-02T22:46:54Z  in response to kolban
                      If you simply want to get a working WS call, and SOAP UI is working for you, look in your system data toolkit for the service "Call Web Service with SOAP Envelope" it allows you to simply create a SOAP request and get back the SOAP response. You have to do all the construction and parsing, but it may get you unblocked.

                      There are several articles on the wiki showing how to use it.

                      http://bpmwiki.blueworkslive.com/display/commwiki/SOAP+Message+Connector+Survival+Kit
                      http://bpmwiki.blueworkslive.com/display/commwiki/Using+the+SOAP+Connector

                      Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
                      • shyenuganti
                        shyenuganti
                        40 Posts
                        ACCEPTED ANSWER

                        Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                        ‏2013-01-09T15:54:07Z  in response to SystemAdmin
                        Hi all, Thanks for your responses on this issue. Still this is not solved on my end.

                        I am trying to test the webservice connector with another very simple WS-I compliant wsdl to make sure we don't have any other issues here. I have hosted a sample hello world mock webservice on my local machine using the soapUI. When trying to discover this service from the BPM, I am seeing the same issue. I have attached the wsdl to this post. Can some one help me to identify a problem here? This simple wsdl passed the WS-I compliance test from the soapUI.

                        @Kolban, If possible, Can you please run this wsdl in BPM 8 and see if this is returning any specific error ?
                        • SystemAdmin
                          SystemAdmin
                          7615 Posts
                          ACCEPTED ANSWER

                          Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                          ‏2013-01-09T20:24:13Z  in response to shyenuganti
                          Hi shyenuganti

                          You can download the wsdl and try to see if you can resolve the issue related to that Notification Element and load the wsdl from file location in teamworks.

                          -Muni
                          • shyenuganti
                            shyenuganti
                            40 Posts
                            ACCEPTED ANSWER

                            Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                            ‏2013-01-09T20:32:32Z  in response to SystemAdmin
                            Sorry, I still did not get this point. In the properties for Webservice Connector, I dont see an option to select a WSDL from the file system. All I see is to use a WSDL URI directly or browse an UDDI or WSRR registry. Can anyone please point out any article about how I can browse my local file system and upload a wsdl to BPM?
                            • SystemAdmin
                              SystemAdmin
                              7615 Posts
                              ACCEPTED ANSWER

                              Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                              ‏2013-01-09T21:13:57Z  in response to shyenuganti
                              Can make a URI to a local file by simply doing - file://localhost/somepath. See this article -

                              http://en.wikipedia.org/wiki/File_URI_scheme

                              Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
                              • shyenuganti
                                shyenuganti
                                40 Posts
                                ACCEPTED ANSWER

                                Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                                ‏2013-01-10T14:37:21Z  in response to SystemAdmin
                                Hi Andrew,

                                The process center is running on a remote server and I am using the client on my desktop. The firewall is not letting me to connect to my local machine from the server. I cant use this Hostname:Port model to access the wsdl on my local machine. Is there any other way that I can use to upload the wsdl that is on my desktop ?
                                • SystemAdmin
                                  SystemAdmin
                                  7615 Posts
                                  ACCEPTED ANSWER

                                  Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                                  ‏2013-01-10T15:58:50Z  in response to shyenuganti
                                  Gotcha. Without file access to the server I wouldn't really know how to tackle this….

                                  Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
                • kolban
                  kolban
                  3315 Posts
                  ACCEPTED ANSWER

                  Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                  ‏2013-01-02T21:14:06Z  in response to shyenuganti
                  See the attached screen shot for what I see in 8.0.1

                  Neil
                  • shyenuganti
                    shyenuganti
                    40 Posts
                    ACCEPTED ANSWER

                    Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

                    ‏2013-01-02T21:16:47Z  in response to kolban
                    From the screenshot, I see that there are some new features in BPM 8 which are quite helpful in debugging errors like these :) This is not available in 7.5.
  • Carlos Verdes
    Carlos Verdes
    4 Posts
    ACCEPTED ANSWER

    Re: Issue Calling Axis2 webservices from IBM BPM 7.5.1 Advanced Edition

    ‏2014-01-29T12:23:45Z  in response to shyenuganti

    Hi,

     

    I had the same error and I fixed adding an import clause inside the element schema.

     

    In your case you have the next schema declaration  which uses a "ns3" namespace that is not declared inside this schema tag, so you need to import that namespace.

     Your code:
    <xs:schema xmlns:xsd="http://policyservice_v1.ws.thi.nationwide.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policyservice_v1.ws.thi.nationwide.com">
        <xs:element name="msgNotify">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="param0" nillable="true" type="
    ns3:NotificationMessage"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:schema>
    
     

    Try adding an import like this (line 2):

       
    <xs:schema xmlns:xsd="http://policyservice_v1.ws.thi.nationwide.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policyservice_v1.ws.thi.nationwide.com">
        <xs:import namespace="http://service.policyservices.thi.nationwide.com/xsd" />
        <xs:element name="msgNotify">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="param0" nillable="true" type="ns3:NotificationMessage"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:schema>
    

     

    Let me know if this fixed your problem.

     

    Updated on 2014-01-29T12:27:22Z at 2014-01-29T12:27:22Z by Carlos Verdes