cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI as Web Service

dirk_niemeier
Explorer
0 Kudos

Hi,

I published an standard BAPI via SE80 as web service. In SOAMANAGER I configured Service an Endpoint for the WS-BAPI.

Now there are a few problems.

Secret nature 1: The web-Service-Navigator for that binding doesn't work :Fehlercode:ICF-NF-http-c:000-u:SAPSYS-l:D-i:stuekenri52_SQ1_00-v:0-s:404-r:Notfound

Secret nature 2: The WDSL document for the binding is malformed. The mendatory parameter "address" is missing.

...

- <wsa:EndpointReference xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">

<wsa:ReferenceParameters />

</wsa:EndpointReference>

...

Secret nature 3:

I can import the WSDL in Eclipse and generate an Webservice Consumer by ignoring the obove error. The first connet with authentication will work, but while accessing the Bapi I get an "connetion refused"

12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection

WARNUNG: WSP0075: Policy assertion "enableBlocking" was evaluated as "UNKNOWN".

30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection

WARNUNG: WSP0075: Policy assertion "enableCommit" was evaluated as "UNKNOWN".

30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection

WARNUNG: WSP0075: Policy assertion "required" was evaluated as "UNKNOWN".

30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection

WARNUNG: WSP0075: Policy assertion "enableWSRM" was evaluated as "UNKNOWN".

30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection

WARNUNG: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".

Exception in thread "main" com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused: connect

at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:134)

at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:140)

at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)

at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)

at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)

at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)

at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)

at com.sun.xml.ws.client.Stub.process(Stub.java:248)

at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)

at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)

at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)

at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)

at $Proxy34.stdmaterialGetintnumber(Unknown Source)

at de.stueken.ws.TestWSBAPIService.main(TestWSBAPIService.java:32)

Caused by: java.net.ConnectException: Connection refused: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

at java.net.Socket.connect(Socket.java:519)

at java.net.Socket.connect(Socket.java:469)

at sun.net.NetworkClient.doConnect(NetworkClient.java:163)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)

at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)

at sun.net.www.http.HttpClient.New(HttpClient.java:306)

at sun.net.www.http.HttpClient.New(HttpClient.java:323)

at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:831)

at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718)

at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:896)

at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:122)

... 13 more

Any suggestions?

TIA

Dirk

Edited by: Dirk Niemeier on Mar 30, 2010 2:56 PM

Where is my formatting gone? I preview it looks well.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Dirk,

A couple of questions... Are you using a the enpoint URL to import the WSDL into Eclipse or you're importing it from your file system? If you're using the endpoint URL, does the URL have WS-Policy in it? If yes, do you need to be using WS-Policies?

If you don't need to be using WS-Policies, when you specify the endpoint URL for import into Eclipse, replace the 'ws-policy' bit with 'standard' in the URL & check if that makes a difference.

I always seem to have problems testing webservices with WS Navigator. I now only use SoapUI for testing.

Regards, Trevor

dirk_niemeier
Explorer
0 Kudos

Hello Trevor,

I am using the import URL.

I think there are generelly problem in the WS-config. I tried out the the same situation on our BI-system. There is an J2EE installed. There I can use the WS-Navigator. But when I test the BAPI in WS-Navigator I get the same error while in my Java WS-consumer prog.: "Connection refused: connect"

So I think there must be an authentication problem or something else.

TIA

Dirk