cancel
Showing results for 
Search instead for 
Did you mean: 

Problem creating schema source while using WebService in MessageMapping

Former Member
0 Kudos

Hi, scenario is RFC2WS.

Problem that occurs is that when i want to use a method from WebService in MessageMapping XI won't import the structure. I am getting following error. The WSDL is from an external portal on which a WebService is ready to invoke.

<b>What might be the problem?! </b>

<i>

Problem when creating schema source:

Details

java.lang.NullPointerException

STACKTRACE:

com.sap.aii.utilxi.misc.api.BaseException: java.lang.NullPointerException

at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.setSchema(XsdSchemaTextable.java:86)

at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.setSchema(XsdContainerTextView.java:46)

at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.<init>(XsdContainerTextView.java:36)

at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.makeFromTreeDoc(MultiViewEditor.java:216)

at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.<init>(MultiViewEditor.java:64)

at com.sap.aii.mappingtool.mf.TransformationPanel.createTargetView(TransformationPanel.java:264)

at com.sap.aii.mappingtool.mf.TransformationPanel.<init>(TransformationPanel.java:100)

at com.sap.aii.mappingtool.mf.MappingTool.<init>(MappingTool.java:32)

at com.sap.aii.mappingtool.api.MappingToolFactory.getInstance(MappingToolFactory.java:96)

at com.sap.aii.mappingtool.fwutil.util.ToolUtil.restartTool(ToolUtil.java:315)

at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView.loadIfrSchema(XiTransformationView.java:274)

at com.sap.aii.ibrep.gui.mapping.xitrafo.XiMappingView$LinkDataTarget.setData(XiMappingView.java:378)

at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView$MessageDataTarget.setData(XiTransformationView.java:973)

at com.sap.aii.utilxi.swing.toolkit.dnd.DataTarget.setData(DataTarget.java:514)

at com.sap.aii.utilxi.swing.toolkit.dnd.DataTarget.drop(DataTarget.java:462)

at java.awt.dnd.DropTarget.drop(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer.access$800(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)

at sun.awt.dnd.SunDropTargetEvent.dispatch(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processDropTargetEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

STACKTRACE:

java.lang.NullPointerException

at com.sap.aii.utilxi.xsd.api.XsdHandler.saveSchemaToDocument(XsdHandler.java:61)

at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.setSchema(XsdSchemaTextable.java:82)

at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.setSchema(XsdContainerTextView.java:46)

at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.<init>(XsdContainerTextView.java:36)

at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.makeFromTreeDoc(MultiViewEditor.java:216)

at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.<init>(MultiViewEditor.java:64)

at com.sap.aii.mappingtool.mf.TransformationPanel.createTargetView(TransformationPanel.java:264)

at com.sap.aii.mappingtool.mf.TransformationPanel.<init>(TransformationPanel.java:100)

at com.sap.aii.mappingtool.mf.MappingTool.<init>(MappingTool.java:32)

at com.sap.aii.mappingtool.api.MappingToolFactory.getInstance(MappingToolFactory.java:96)

at com.sap.aii.mappingtool.fwutil.util.ToolUtil.restartTool(ToolUtil.java:315)

at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView.loadIfrSchema(XiTransformationView.java:274)

at com.sap.aii.ibrep.gui.mapping.xitrafo.XiMappingView$LinkDataTarget.setData(XiMappingView.java:378)

at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView$MessageDataTarget.setData(XiTransformationView.java:973)

at com.sap.aii.utilxi.swing.toolkit.dnd.DataTarget.setData(DataTarget.java:514)

at com.sap.aii.utilxi.swing.toolkit.dnd.DataTarget.drop(DataTarget.java:462)

at java.awt.dnd.DropTarget.drop(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer.access$800(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)

at sun.awt.dnd.SunDropTargetEvent.dispatch(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processDropTargetEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

</i>

Accepted Solutions (0)

Answers (6)

Answers (6)

henrique_pinto
Active Contributor
0 Kudos

Make sure the type of file import in the External Definiton is "wsdl".

Also, instead of drag&drop, open the match code for the message selection in message mapping, browse to your wsdl external definition and select the desired message/operation.

Finally, make sure you WSDL doesn't have any unsupported elements/attributes.

The list of supported elements is here: SAP Service Marketplace at service.sap.com/xi ® Media Library ® Documentation: SAP XI 3.0 (SP11) – Supported XML Schema and WSDL (EN).

Regards,

Henrique.

nikhil_bose
Active Contributor
0 Kudos

hi.

regards,

Message was edited by:

Nikhil Bos

Former Member
0 Kudos

Hi Nikhil,

thx for the links. So i got the impression that i also could use the XSD-description of the WSDL - i only have to adjust the correct namespace for datatype etc.

is this right?! br

nikhil_bose
Active Contributor
0 Kudos

hi carsten,

try with that. further questions are welcomed.

thanks and regards,

nikhilbos

aashish_sinha
Active Contributor
0 Kudos

Hi ,

Can you please cross check these steps carefully.

1. After importing the WSDL using external definition, did you checked msges Tab for for the included msg to see what msges you have added.

and be careful that the namespaces of the messages are part of the WSDL description and can differ from the namespace of the external definition object.

2.Did you created message Interface corresponding to the message types from the external definition? it is needed to route the message to webService. Here select message types of the external definition object. Assign input and output messages.

3. Creating a SOAP Receiver Channel

To call the Web service, you create a communication channel with type SOAP and

direction receiver in the Integration Directory. The obligatory parameters in the

configuration are Target URL and SOAP action. You get the values you have to enter

here from the WSDL file.

Creating a SOAP Sender Channel

When you create a SOAP sender channel you have to define the namespace and the

name of a message interface. Since no input help is provided, you copy and paste the

values from your Integration Repository.

Select the Quality of Service according to your interface type. If you are using a

synchronous interface, select Best Effort. Otherwise, select Exactly Once or EOIO.

Hope this will help you to figure out.

Regards

Aashish Sinha

PS : reward points if helpful

nikhil_bose
Active Contributor
0 Kudos

hi carsten,

this is a good blog that may help you out. tale a look

/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009

<b>When to use WDSL and XSD:</b>

/people/kevin.liu/blog/2004/06/28/a-note-on-wsdl-and-xsd-imports

<b>XSD from WSDL</b>

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

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

you can create the data type but for complex it is better to create XSD from WSDL.

hope this will do

regards,

nikhilbos

Former Member
0 Kudos

Friend,

The null pointer exception creating me little confusion. Please try this way.

Get the WSDL file (*.wsdl) in your PC and try to do it again. I hope this will work.

Get the result if its working.

regards

vinod v

    • reward if helpful

Former Member
0 Kudos

ok, thx for ur advices. But let me explain what i have done.

Scenario is RFC2WebService

1. Downloaded the wsdl and extract it

2. checking URL under location-tag in browser - seems to work fine

3. in IB Design i created a synch. Inbound Interface calling/chosing the needed methods of the WebService (before i added it as external definition)

4. other steps concerning Interface Object are for no interest here.

5. created MessageMapping where i have source message-type from RFC and target message-type i want to take from wsdl.

therefore i drag and drop the external definition on target-field in MM, chose the method i want and after this i get the previously mentioned NullPointer-Exception!!

more i haven't done yet - since i have not found a solution.

From the company which supports the wsdl i could also use a xsd-description of the WebService! When i use this in MessageMapping i could finally chose the method i want (as described for wsdl) - but i have no clue if this will work when invoking the WebService?!

what are ur experience on this?! coudl i also use the XSD-Version of a WSDL?!

br

nikhil_bose
Active Contributor
0 Kudos

hi carsten,

see the SOAP adapter is invoked or not?

get the datatypes from the WSDL downloaded As External Definitions and map with the SOAP in SOAP response of the particular function.

regards,

nikhilbos

Former Member
0 Kudos

as you had already imported the WSDL could you find the message type you require under Messages tab

Former Member
0 Kudos

Well don't know if i get u right. I have imported the WSDL as external Definition and activated it.

Now as i did sometimes before i want to use one method given in WSDL to use in mapping. Therefore i drag&drop the xternal definition to target field and chose the method - after that i get this error.

With another WSDL it works fine!

any clue?

br

P.S. i am on XI3.0 and even tested it recently on 7.0

Former Member
0 Kudos

anyobody?!

plz i need advice....

nikhil_bose
Active Contributor
0 Kudos

hi carsten,

<i>General</i>

check the WSDL url ( mentioned in the last lines as soap location) in the browser, if it displays the contents, the WSDL is fine. otherwise you choose another one.

<i>Mapping</i>

1. Check the source field by exploring the WSDL

2. In the target, choose <b> SOAP_in SOAP_Response </b> version of particular method

<i> but choosing other versions will not rise any problems as such</i>

try these, get me status

regards,

nikhilbos

<i> ** reward if helpful</i>