cancel
Showing results for 
Search instead for 
Did you mean: 

WSDL file - Null Pointer Exception

Former Member
0 Kudos

Hi,

My scenario is RFC to Webservice. The customer has given a wsdl file which contains the request and the response messages. I uploaded the wsdl file as an external definition in the Integration Repository. While creating the message mapping, I am unable to load neither the Request Message nor the Response Message of the wsdl.

I get a Null Pointer Exception error saying 'Problem when creating schema source'. Has anyone encountered this kind of error.

I paste the wsdl file code here:-

-


start of code------

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

<wsdl:definitions xmlns:indLink="http://service.anz.ind.com/ProcessVendor" xmlns:REQ="http://service.anz.ind.com/ProcessVendor/Request" xmlns:RESP="http://service.anz.ind.com/ProcessVendor/Response" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://service.anz.ind.com/ProcessVendor" name="ProcessVendorService">

<wsdl:types>

<xsd:schema>

<xsd:import namespace="http://service.anz.ind.com/ProcessVendor/Request" schemaLocation="ProcessVendorRequest.xsd"/>

<xsd:import namespace="http://service.anz.ind.com/ProcessVendor/Response" schemaLocation="ProcessVendorResponse.xsd"/>

</xsd:schema>

</wsdl:types>

<wsdl:message name="ProcessVendorRequest">

<wsdl:part name="requestData" element="REQ:ProcessVendorRequest"/>

</wsdl:message>

<wsdl:message name="ProcessVendorResponse">

<wsdl:part name="responseData" element="RESP:ProcessVendorResponse"/>

</wsdl:message>

<wsdl:portType name="ProcessVendorService">

<wsdl:operation name="ReqResp">

<wsdl:input name="processRequest" message="indLink:ProcessVendorRequest"/>

<wsdl:output name="processResponse" message="indLink:ProcessVendorResponse"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="ProcessVendorServiceSoapBinding" type="indLink:ProcessVendorService">

<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="ReqResp">

<wsdlsoap:operation soapAction="process"/>

<wsdl:input>

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output>

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="ProcessVendorService">

<wsdl:port name="ProcessVendor" binding="indLink:ProcessVendorServiceSoapBinding">

<wsdlsoap:address location="http://ls4000.test.anz.com:8000/indLinkService/services/ProcessVendor"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

-


end of code-------

Appreciate a possible solution.

Thanks.

Krishnan

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

The above WSDL you provided is working perfectly for me. While importing external definition don't forget to choose <b>category</b> as <b>WSDL</b>.

After creating External Definition, if I drag and drop on Message mapping,i'm getting two messages.

ProcessVendorRequest

ProcessVendorResponse

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

I am also able to import the wsdl file into the external definition of the Integration Respository without any errors.

In Message Mapping, if you try to point the Reqeust or the Response Message of this WSDL, it given a Null Pointer Exception.

Thanks.

Krishnan

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

Its possible for me to do successfully. See my above reply. What I can suggest you is , close the mapping which u created now. And try to re-create again, Or close the IR and open and try it again. If still you get any exception reply back.

Best regards,

raj.

Former Member
0 Kudos

hi raj,

it's strange... i am still not able to get out of this error.

what i did was:-

1) imported the wsdl file in external definition. (i chose the category - wsdl, and messages - From all available message definitions)

2) created a new message mapping. dragged the wsdl from the external definition to the source message area. a pop appears to select either of the Request or Response message. on selecting the request and cliking OK, the error window pops --> 'problem when creating schema source, Null Pointer Exception'. Upon closing the error window, no structure is loaded. The Tree and Occurrences are empty.

i am on PI 7.0 SP 11.

pls advise.

Regards.

Krishnan

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

I couldn't able to figure it out. Ok let we try this way. Instead of using this in Mapping,try to create Interface with this External definition. See whats the result.

Please cross verify the same with your EXternal Defn.

Messages -Tab

ProcessVendorResponse http://service.anz.ind.com/ProcessVendor

ProcessVendorRequest http://service.anz.ind.com/ProcessVendor

WSDL-Tab

See whether it displays without any errors.

External References Tab.

ProcessVendorRequest.xsd

ProcessVendorResponse.xsd

Best regards,

raj.

Former Member
0 Kudos

hi raj,

even if we create Message Interface using this External Definition, we will not be able to use this in Message Mapping because, only Message Types are used as Source and Target for mapping.

As you adviced, I created Message Interface (Inbound, Sync) and associated the Request and Response Message. There are no errors. But in Message Mapping, in the source window, Message Interfaces cannot be selected, only Message Type or the External Definition can be selected.

Yes, I cross verified External Definition. It's the same as what you specified in your reply.

Messages -Tab

-


ProcessVendorResponse http://service.anz.ind.com/ProcessVendor

ProcessVendorRequest http://service.anz.ind.com/ProcessVendor

WSDL-Tab

-


No errors are displayed. It displays the WSDL definition.

External References Tab

-


ProcessVendorRequest.xsd

ProcessVendorResponse.xsd

Were you able to get the Request and Response structure displayed in the Source and Target window of the Message Mapping when you drag and drop and external definition.

Thanks.

Krishnan

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

I asked you to create Message Interface only to narrow down our approach. Yes Its possible for me to successfully drag and drop your WSDL into my message mapping.

Let we try ony more possibility.

Go to the below URL and save it as .wsdl. create Exter.Defn for it and use in mapping, reply back the results.

http://webservices.imacination.com/distance/Distance.jws?wsdl

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

Thanks for your reply and step by step guidance of troubleshooting.

1. From the URL, I got the code saved into WSDL file.

2. Imported the WSDL to External Definition

3. Created a Message Mapping and dragged and dropped the WSDL. A pop window with lot of request and response messages appeared. Selected getDistanceRequest and it loaded without any errors. Sameway, in the target space, selected the getDistanceResponse and it loaded without any errors.

I could do this successfully. The same way I tried my WSDL, it throws the 'Null Pointer Exception'. STRANGE!!!!!

Kindly advice.

Thanks.

Krishnan

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

How many SWCV do u have in IR. The reason I'm asking this bcoz, the same stuff works for me till now, but suddenly its throwing some null pointer exception. So I thought of creating the same in another SWCV then it works fine. Plz try this possibility and let me know.

Best regards,

raj.

Former Member
0 Kudos

Hi raj,

Apart from the SAP BASIC component, I have just two SWCV in my Repository. I will create a new SWCV in SLD and import it in IR and will then try loading WSDL file.

Will soon let you know the status.

Thanks.

Krishnan

Former Member
0 Kudos

Krishnan,

The WSDL is wrong. If I open it in Altova XML Spy and check for its well formdness it is throwing me the error. So please recheck the WSDL once again.

Regards,

---Satish

Former Member
0 Kudos

hi satish,

if you refer to Raj's previous replies, he is able to successfully load the file. I don't know how to validate or check the wellformedness of the WSDL. Can u guide me.

Thanks.

Krishnan

justin_santhanam
Active Contributor
0 Kudos

Satish,

Its possible for me to succesfully load into XI as External Definition. Even I can use the same in mapping!!!

Best regards,

raj.

sridharreddy_kondam
Active Contributor
0 Kudos

Raj,

I too tried the same using in Message mapping getting the same error as krishnan metioned...

and i think its the problem of wsdl as the error points towards the Schema source...

Regards,

sridhar

justin_santhanam
Active Contributor
0 Kudos

Common friends,

How come its possible for me then? I created successfully!!!

Krishnan, I too agree with above friends reply.

Please validate your schema in http://www.validome.org/xml/validate/ [Upload ur WSDL and click validate]. It successfully worked for me, thats why I never turned my way to think it might be schema issue. Anyhow sorry for leading u in wrong direction.

Best regards,

raj.

Former Member
0 Kudos

hi raj and sridhar,

as suggested, I uploaded the wsdl file and validated. It gives an error saying that 'This document is not valid'. i don't know how to fix this error or how to make it well formed. in fact this wsdl works perfectly in the customer landscape while simulating the web service but for some strange reason erroring out when used with XI.

any suggestions.

Krishnan

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

Did u solved the issue? One more final try Krishnan. In your WSDL u are using two xsd's right? Did u imported those too as External Definition.

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

After seeing your reply, I imported the 2 XSDs into External Definition. Tried once agian, still get the same error.

Regards.

Krishnan

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

Thanks for taking all my suggestions krishnan.While creating XSD External definitions did u gave source file as ProcessVendorRequest.xsd and

ProcessVendorResponse.xsd respectively. I'm not sure it will solve ur issue, but plz give a try.

Did u got what i'm saying, after importing the`xsd file the next line u can see source file: input box there u give the file names as mentioned above.

Best regards,

raj.

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

Did u solved the issue.

Best regards,

raj.

Former Member
0 Kudos

hi raj,

i tried to enter the file names in the source field, it didn't help.

what i found was that in the wsdl file the schema is pointing to a location:-

<xsd:schema>

<xsd:import namespace="http://service.anz.ind.com/ProcessVendor/Request" schemaLocation="ProcessVendorRequest.xsd"/>

<xsd:import namespace="http://service.anz.ind.com/ProcessVendor/Response" schemaLocation="ProcessVendorResponse.xsd"/>

</xsd:schema>

may be while loading it is not able to interpret these xsd document. is that so.

thanks.

krishnan

Former Member
0 Kudos

hi raj,

appreciate your wonderful support.

regards.

krishnan

justin_santhanam
Active Contributor
0 Kudos

Krishnan,

Did u solved the issue? Whats the problem, is it with WSDL?

Best regards,

raj.

Former Member
0 Kudos

hi raj,

it is not with the wsdl. after importing the xsd file in the the next line in the source field: I give the relevant xsd file name and it worked.

thanks.

krishnan

Answers (1)

Answers (1)

moorthy
Active Contributor
0 Kudos

Hi,

I think you did not choose wsdl.. during the message mapping

Also check out this blog to get some tips:

/people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1

Rdgs,

Moorthy

Former Member
0 Kudos

hi krishnamoorthy,

can u pls tell me where to choose wsdl in message mapping. When you click the source (select message icon) it pop us a window to select the appropriate message. I drill down to the external definition and collapse the wsdl and select the request message and say ok. but it gives the error after that.

thanks.

krishnan