Creating client proxy for calling web service
Hello,
I like to call a WebServce from our vendor. The vendor provides me no WSDL document.
Question: Is it possible to create a client proxy without WSDL? I have just the SOAP Request/Response.
SAP ECC 6.0
SAP_BASIS 700 0010
Thank you very much in advance for any helpful answer.
Kind regards
Axel
Hi Axel,
I am working on a program to connect to a external web-service from SAP (R/3 enterprise 4.7) and while searching all the available stuff for this I got this method.
But, I am still facing some other issues and hence doesn't have the whole solution. You have to probably try it out from your side once and see if it helps.
Please refer the following blog.
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/847. [original link is broken] [original link is broken] [original link is broken]
it describes a method which is not at all using any WSDL file. Instead it uses the CL_HTTP_CLIENT class to pass a SOAP request to the web-service and then get the response.
Regards
Barada
Similar Messages
-
Namespace Error when generating Client Proxy for Java Web Service
Hi.Experts:
When I want to generating a Client Proxy for my WSDL file created by JAVA,it seems that some namespace errors occur.
The error like this:
"Incorrect value: Unknown Namespace http://sql.java
Exception of class CX_SLIB "
I checked all the SOAP runtime,it seems no error.So do I need to create the objects in the Integration Repository??If it is the truth,then how can I do it.
Best Regards
Martin XieHi Martin
I didn't find this options in SAP GUI Create -->Enterprise Service ->Consumer Service ->url/http
Maybe my version is different.
You say that you can select the file ou url.
Did you select the file or url?
If was file, open this file, find the tag that you have the wrong namespace and eliminate this tag.
If was url, access this url, copy the xml and same in one file, then select this file in the step above.
I don't know if works, its only a suggestion.
regards
Marcos -
Need some help in creating client proxy to call webservice
Hi experts,
I am new to ABAP so couldnt understand the SAP ABAP jargons.
On of my colleague has written one search help exit function and i need to use that and have to write client proxy to establish connection to webservice.
I never worked on proxy or webservice so, struggling to understand the concept and steps.
I am following second part i.e Release 640 part of /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap weblog.
I couldnt find "To get the process started, we turn to our old friend SE80. <b>From the Enterprise Services Tab, we are going to select Client Proxy and then hit create"</b>
when i go to transaction se80 ObjectNavigator, i could see two dropdown lists after some tabs.
in first list, I have selected, "Application Hierarchy", and in second I am selecting "Package".
Not sure whether its correct or not.
Once i do this i could see long list of <b>Object name and its description.</b>
Now, what should i do ? where should i go for "Enterprise Services Tab" to create my proxy.
Any help would be appreciated.
Please send me PDF, having detailed steps to create client proxy.
Thanks,
PranavRight click on the package and select Proxy object. In the Wizard select Service Consumer.
then give the url of the WSDL file you want to access or path if u have a local file.
then give the package for client proxy.
then complete the wizard. the client proxy will be create in that package.
Next step will be creating a Logical Port using the transaction "lpconfig". Give the proxy name of the service interface created under client proxy. and set the configuration as follows.
1. Make as a default port.
2. in the URL, give the url of the webservice (.asmx)
3. select "State Enabled" and "Message ID"
and after creating a logical port, set the proxy settings as in your webbrowser.
(Http proxy server and port).
then simply execute your webservice from SE80. -
Problem in creating a java proxy for PHP web service
This is a problem in generating a java proxy for a PHP webservice.
I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
The WSDL for the PHP web service is also generated .
I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
The wsdl generated by the php program is
<?xml version="1.0" encoding="ISO-8859-1" ?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
<types>
<xsd:schema targetNamespace="urn:hellowsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
<input>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>After making following changes to the wsdl program, I tried to generate java proxy.
<definitions name="hellowsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
<types>
<xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="" style="rpc" />
<input>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>This is how the java stub file looks like:
public class HellowsdlBinding_Stub
extends oracle.j2ee.ws.client.StubBase
implements demo.mypackage.HellowsdlPortType {
* public constructor
public HellowsdlBinding_Stub(HandlerChain handlerChain) {
super(handlerChain);
_setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
setSoapVersion(SOAPVersion.SOAP_11);
setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
* implementation of hello
public java.lang.String hello(java.lang.String name)
throws java.rmi.RemoteException {
StreamingSenderState _state = null;
try {
_state = _start(_handlerChain);
if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
_state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
InternalSOAPMessage _request = _state.getRequest();
_request.setOperationCode(hello_OPCODE);
_state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
_myHellowsdlBinding_hello_ReqS.setName(name);
SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
_bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
_bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
_request.setBody(_bodyBlock);
_state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
_send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
Object _responseObj = _state.getResponse().getBody().getValue();
if (_responseObj instanceof SOAPDeserializationState) {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
} else {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
return _myHellowsdlBinding_hello_RespS.get_return();
} catch (RemoteException e) {
// let this one through unchanged
throw e;
} catch (JAXRPCException e) {
throw new RemoteException(e.getMessage(), e);
} catch (Exception e) {
if (e instanceof RuntimeException) {
throw (RuntimeException)e;
} else {
throw new RemoteException(e.getMessage(), e);
* this method deserializes the request/response structure in the body
protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
int opcode = state.getRequest().getOperationCode();
switch (opcode) {
case hello_OPCODE:
_deserialize_hello(bodyReader, deserializationContext, state);
break;
default:
throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
* This method deserializes the body of the hello operation.
private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
try {
Object myHellowsdlBinding_hello_RespSObj =
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
bodyReader, deserializationContext);
SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
state.getResponse().setBody(bodyBlock);
} catch (DeserializationException e) {
if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
throw e;
public String _getEncodingStyle() {
return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
public void _setEncodingStyle(String encodingStyle) {
throw new UnsupportedOperationException("cannot set encoding style");
public ClientTransport getClientTransport() {
return super._getTransport();
* This method returns an array containing (prefix, nsURI) pairs.
protected String[] _getNamespaceDeclarations() {
return myNamespace_declarations;
* This method returns an array containing the names of the headers we understand.
public QName[] _getUnderstoodHeaders() {
return understoodHeaderNames;
* This method handles the case of an empty SOAP body.
protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
super._initialize(registry);
myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
private static final int hello_OPCODE = 0;
private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
private static final String[] myNamespace_declarations =
new String[] {
"ns0", "http://localhost/mywork/hellowsdl"
private static final QName[] understoodHeaderNames = new QName[] { };
}The errors that are produced are-
java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
Kindly help to resolve this.
Thanks.This is a problem in generating a java proxy for a PHP webservice.
I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
The WSDL for the PHP web service is also generated .
I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
The wsdl generated by the php program is
<?xml version="1.0" encoding="ISO-8859-1" ?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
<types>
<xsd:schema targetNamespace="urn:hellowsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
<input>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>After making following changes to the wsdl program, I tried to generate java proxy.
<definitions name="hellowsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
<types>
<xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="" style="rpc" />
<input>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>This is how the java stub file looks like:
public class HellowsdlBinding_Stub
extends oracle.j2ee.ws.client.StubBase
implements demo.mypackage.HellowsdlPortType {
* public constructor
public HellowsdlBinding_Stub(HandlerChain handlerChain) {
super(handlerChain);
_setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
setSoapVersion(SOAPVersion.SOAP_11);
setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
* implementation of hello
public java.lang.String hello(java.lang.String name)
throws java.rmi.RemoteException {
StreamingSenderState _state = null;
try {
_state = _start(_handlerChain);
if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
_state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
InternalSOAPMessage _request = _state.getRequest();
_request.setOperationCode(hello_OPCODE);
_state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
_myHellowsdlBinding_hello_ReqS.setName(name);
SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
_bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
_bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
_request.setBody(_bodyBlock);
_state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
_send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
Object _responseObj = _state.getResponse().getBody().getValue();
if (_responseObj instanceof SOAPDeserializationState) {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
} else {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
return _myHellowsdlBinding_hello_RespS.get_return();
} catch (RemoteException e) {
// let this one through unchanged
throw e;
} catch (JAXRPCException e) {
throw new RemoteException(e.getMessage(), e);
} catch (Exception e) {
if (e instanceof RuntimeException) {
throw (RuntimeException)e;
} else {
throw new RemoteException(e.getMessage(), e);
* this method deserializes the request/response structure in the body
protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
int opcode = state.getRequest().getOperationCode();
switch (opcode) {
case hello_OPCODE:
_deserialize_hello(bodyReader, deserializationContext, state);
break;
default:
throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
* This method deserializes the body of the hello operation.
private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
try {
Object myHellowsdlBinding_hello_RespSObj =
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
bodyReader, deserializationContext);
SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
state.getResponse().setBody(bodyBlock);
} catch (DeserializationException e) {
if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
throw e;
public String _getEncodingStyle() {
return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
public void _setEncodingStyle(String encodingStyle) {
throw new UnsupportedOperationException("cannot set encoding style");
public ClientTransport getClientTransport() {
return super._getTransport();
* This method returns an array containing (prefix, nsURI) pairs.
protected String[] _getNamespaceDeclarations() {
return myNamespace_declarations;
* This method returns an array containing the names of the headers we understand.
public QName[] _getUnderstoodHeaders() {
return understoodHeaderNames;
* This method handles the case of an empty SOAP body.
protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
super._initialize(registry);
myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
private static final int hello_OPCODE = 0;
private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
private static final String[] myNamespace_declarations =
new String[] {
"ns0", "http://localhost/mywork/hellowsdl"
private static final QName[] understoodHeaderNames = new QName[] { };
}The errors that are produced are-
java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
Kindly help to resolve this.
Thanks. -
User authentication error with Proxy Java Calling web Service in XI
Hello,
I have deploy a Web Service in SAP XI 3.0. within a SOAP sender adapter.
I have also created the Proxy Java Class to access the webservice in the Developer Studio and a Plain Java Class (only with a method main) which uses the proxy classes to consume the web service.
But when I launch the program a get the next error message:
java.rmi.RemoteException: Service call exception; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.
at com.everis.serviciosweb.xi.MI_OUT_STATUSBindingStub.MI_OUT_STATUS(MI_OUT_STATUSBindingStub.java:73)
at com.everis.llamadas.invocacionWSStatus.main(invocacionWSStatus.java:76)
Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.handleResponseMessage
Where MI_OUT_STATUSBindingStub is my Stub Class.
I have tried to set USERNAME_PROPERTY and PASSWORD_PROPERTY at runtime from my Stub class to the values that I use to access SAP XI (Integration Repository & Integration Directory) but it still doesn't´t work.
Have anyone a solution?
Thanks.Hi,
finally I have fixed it.
The root of the problem was on the way that I proceed with the generation of wsdl in Integration Directory.
The second step in the wizard for generation of wsdl ask for a url to call the web service and gives you an option to complete the url automatic. I have use this option and it have proposed my an url of type http://<host>:<port>/sap/xi/engine?entry=.......
But the SOAP adapter call is in the form http://<host>:<port>/XISOAPAdapter/MessageServlet?channel=<party>:<business service>:<channel>
So using this type of url in the generation of wsld solves all the problems.
Regards,
Antonio. -
Create a session for a web service in jdeveloper10g
Hi All,
Question 1: How to create a session for a java web service created in jdeveloper10g.
Question 2: How to restrict a particular user for accessing a java web service.
I have done this by using key store. But when creating the java web service client, again we have to configure the key store, which should not happen in my case. Hence i like to create a method for login in a web service, create a session id for the user if he is a valid user and send the session id back to web service client. Using the session id they can access other methods in the web service.
Can any one suggest how I can accomplish this. Thanks in advance.I don't know this can be disscussed or not.
Please delete my topic if this can't be disscussed here.
Thank you. -
Not able to pass user credentials in a full trust proxy to call web service in Sandbox solution
Hello,
I am trying to build a sandbox webpart that calls a windows authenticated webservice to fetch some data. I tried to pass the DefaultCredentials to the webservice proxy but The credentials passed are that of the
usercodeserviceproxy process ( in my case it is network service) . I see that the user account trying to authenticate is Domain\machinname$ which is the network service.
My question is - is there a way to pass the logged in user credentials to the web service from sandbox proxy ?' in Host Names is not allowed. Our hosname has '_'.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/67/be9442572e1231e10000000a1550b0/frameset.htm -
Deploy pre-compiled client proxy with a web service
When a web service is deployed on an OAS server, the page at the endpoint URL includes a link to a proxy jar file (<endpoint url>?proxy_jar). I have a proxy jar that I've built and I'd like to be able to include it in my war file so that the proxy jar URL will download it instead of the server-generated one. Is there a way to do that?
I did something similar with the wsdl file: I included it in the war file in the same folder and filename as the web service interface class, but that didn't work for the proxy jar file.
-PeterHi Peter,
You cannot replace the proxy jar generated by the Oracle Web Services runtime with your own version. If you want to provide your own version, you will have to handle it as a classic resource in your .ear file, and advertize the location of this resource using some other mechanism.
-Eric -
How to create Listening Channel for XML/web services repsonse
Hi , I am new to B2B 11g, wish to ask tht,
I followed the B2B tutorial by using Generic File and it working fine. However,
if I wish to receive XML from trading partner thought web server, how should i configure the listening channel, which protocol should I use.
And may any1 kindly reference me to any link or info?
Thanks you.however..if remote partner going to send me thought web services and not thought folder, should I do anything on my B2B? did i need to specific any extra listening channel?No. No additional configuration is required for receiving files over HTTP. Just ask your TP to post files over one of the below URL's -
http://hostname:soa_server_port/b2b/httpReceiver or http://hostname:soa_server_port/b2b/transportServlet
If you just want to test your B2B whether it is properly configured then best way is to have another B2B setup (may be a new domain) which will mock your TP setup. From that B2B setup send message to your B2B over HTTP (on any of above URL's) and see if gets processed successfully.
If you just want to test whether your B2B is ready to accept messages over HTTP, then access the above URL's through browser and make sure that you see below message -
"B2B Server is ready to accept HTTP messages from the Trading Partner"
Regards,
Anuj -
Sample code for calling web services for export
Hi I am trying to use web service ExportProject to export a project out of Primavera DB. The Export service uses MTOM (Message Transmission Optimization Mechanism) to send the output files as attachments. Need some information on
- Can the export service be specified a location for the transfer? or it will come attached in the response?
- How do i access this attachment? I am using PL/SQL for doing this.
Any help will be appreciated.I am not a pl/sql guy but there is a java example in the demo code that might help you figure out a pl/sql approach.
Look in WSDemo.java in the exportProject method. The WSDemo.java file was located in the following directory on my system: \Oracle\P6EPPM\ws\demo\Java\JAX-WS\src\com\primavera\wsclient\demo
Gene -
Maximum data for calling web service
Hi all,
I try to trigger a C# webservice via XI.
If I transfer more than 65000 bytes then I get a "Bad request error".
When I transfer less than 65000 bytes everything works fine.
Is that a configuration in XI or a limit in the service itself?
Any ideas?
regardsHi,
In theory there is no limitation on data can be called using webservice but as you know webservice use HTTP for transferring data hence it is limitation of HTTP regarding un-interrupt transfer of data.
This limit of http can be vary from landscape to landscape, over LAN you may get 64MB but over internet you may get similar error for few MBs or less.
Suggestion is to breakup data into smaller part for reliable transfer of information otherwise you will see this error often.
Webservices are not recommended for high volume data transfer.
Regards,
Gourav -
Creating a Proxy for consuming WDSL in ABAP
Hi Gurus,
I am trying to consume a web service by SE80. My first step was to create a Proxy for the web service. (SE80- Service Consumer).
The problem is that I keep getting the same error.
Exception occurred in library handler
"Incorrect value: Unknown Namespace http://schemas.xmlsoap.org/soap/encoding/"
Thank you in advance.
Best regards,
Lilibeth.Check out the following links to see if it meets your needs.. Has examples to call a ABAP proxy (that consumes a webservice) from ABAP program...
http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/frameset.htm (webservices ->webservices toolset -> examples)
http://help.sap.com/saphelp_dm40/helpdata/en/1a/b69d427cab0831e10000000a1550b0/frameset.htm -
Error received when calling web service from database.
Hi folks,
I am trying to call a web service from the database (using the Oracle database web services call-out utility) and I am getting the following error:
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.rmi.RemoteException:
oracle.j2ee.ws.common.encoding.DeserializationException:unknown prefix in QName
literal: null
ORA-06512: at "SCOTT.PENALTY_ALG_WS_WRAPPER", line 1
ORA-06512: at "SCOTT.ABC_PROC", line 131
ORA-06512: at line 1
This is the error I see in the trace file on the database:
*** 2009-11-10 11:30:37.353
java.rmi.RemoteException: oracle.j2ee.ws.common.encoding.DeserializationException:unknown prefix in QName literal: null
at oracle.j2ee.ws.common.encoding.simpletype.XSDQNameEncoder.stringToObject(XSDQNameEncoder.java:75)
at oracle.j2ee.ws.common.encoding.SimpleTypeSerializer.deserialize(SimpleTypeSerializer.java:141)
at oracle.j2ee.ws.common.encoding.SOAPFaultInfoSerializer.doDeserializeSOAP11(SOAPFaultInfoSerializer.java:120)
at oracle.j2ee.ws.common.encoding.SOAPFaultInfoSerializer.doDeserialize(SOAPFaultInfoSerializer.java:94)
at oracle.j2ee.ws.common.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:180)
at oracle.j2ee.ws.client.StreamingSender._readBodyFaultElement(StreamingSender.java:513)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:321)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
at genproxy.runtime.PenaltyAlgBPELProcessBinding_Stub.process(genproxy.runtime.PenaltyAlgBPELProcessBinding_Stub:80)
at genproxy.PenaltyAlgBPELProcessPortClient.process(PenaltyAlgBPELProcessPortClient.java:40)
at genproxy.PenaltyAlgBPELProcessPortClientJPub.process(PenaltyAlgBPELProcessPortClientJPub.java:46)
This web service is deployed on Oracle app server 10.1.3.4. It calls a BPEL process which in turn calls Oracle Business Rules.
I used JPublisher to create the stubs for the web service and load them into the database.
Any ideas on what might be causing this error?
Thanks.
KashifWell, I think so... I've followed all the steps, and my merged WSDL file seems like the one in page 12...
Any suggestion, please?
Thank you, -
Calling Web Service - XML Parse Error
Hello,
I have created Client proxy to call a Web Service. This service requires WS Header. This is my code to create the header:
concatenate
'<soap:Header>'
' <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'
' <wsse:UsernameToken Id="uuid-90128b0b"> '
' <wsse:Username>User123</wsse:Username> '
' <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-token-profile-1.0#PasswordText">Pass123</wsse:Password> '
' </wsse:UsernameToken> '
' </wsse:Security> '
' </soap:Header> ' into l_string.
When I make the call, I receive the following error:
CODE SoapFaultCode:4
ERRORTEXT #XML parse error.#
If I comment out UsernameToken element, the errors says that UsernameToken is missing, once I added it, I get XML parse error.
Here is the info from trace file:
XRFC> <
XRFC> <
XRFC> INFO 09:40:16: SOAP SESSION Protocol CL_SOAP_SESSION_PROTOCOL <
XRFC> ->IF_SOAP_PROTOCOL~PRE_PROCESS() SOAP Session Protocol <
XRFC> preprocessed <
XRFC> <
XRFC> INFO 09:40:16: SOAP Transport Binding CL_SOAP_HTTP_TPBND_ROOT <
XRFC> ->IF_SOAP_TRANSPORT_BINDING~SEND() Try to send message ( DEST = <
XRFC> CCTEST_AUC ,PATH = ,URL = ,SOAP Action = "runTransaction" ) <
XRFC> <
XRFC> INFO 09:40:16: SOAP Transport Binding CL_SOAP_HTTP_TPBND_ROOT <
XRFC> ->IF_SOAP_TRANSPORT_BINDING~SEND() Message sent <
XRFC> <
XRFC> INFO 09:40:16: SOAP Transport binding CL_SOAP_HTTP_TPBND_ROOT <
XRFC> ->IF_SOAP_TRANSPORT_BINDING~RECEIVE() Try to receive message <
XRFC> <
XRFC> INFO 09:40:16: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->HANDLE <
XRFC> STATUSCODE() Received return code 500 ( Internal Server Error ) <
XRFC> <
XRFC> ERROR 09:40:16: SOAP Message CL_SOAP_MESSAGE->IF_SOAP_MESSAGE <
XRFC> PART~INITFOR_DESERIALIZE() SOAP Fault Exception caught: :
XML <
XRFC> parse error.
<
XRFC> <
Does anyone know what could be the problem?
Thanks,
AlexI was able to fix the issue last night, it was caused by preparing WS header incorrectly. Originally, I did not use wsse prefix, and this was issue number 1. Once I added the prefix, I thought that the following code is incorrect because it was only retreiving 1 elements - UsernameToken.
xml_root = xml_document->get_root_element( ).
xml_element ?= xml_root->get_first_child( ).
* add header element by element to SOAP header
while not xml_element is initial.
name = xml_element->get_name( ).
namespace = xml_element->get_namespace_uri( ).
ws_header->set_request_header(
name = name
namespace = namespace
dom = xml_element ).
xml_element ?= xml_element->get_next( ).
endwhile.
So, I added to logic to get and then set all childeren, and this was the mistake. This is what caused "XML Parse Error". UsernameToken had already all info with user name and password. Once I removed the extra logic to get all 4 elements, the client proxy began working.
Regards,
Alex -
Fastest way to call web service in same ear?
I have a generic web service handler that I've deployed with a web-services.xml
file. I don't have a schema or wsdl. I'm going to have a servlet that will recieve
legacy messages (not SOAP format) and build a SOAP message from that. I will
then need to call the web service that I've built.
What I need to know is how to make that call from the servlet to the web service
to be reasonably efficient. I could just open a HTTP connection to it, but I'd
like to keep that as a last resort, seeing as the client and server are in the
same ear. I believe there's some kind of ability to build a proxy for web services,
but if all that does is hide an HTTP connection, then that isn't what I want.
I believe generating the "client interface" for the web service requires a wsdl
(someone please confirm that), which I do not have. Besides, I think the client
interface just hides an HTTP connection.Hi Paul,
This question seems to be generic to any J2EE app bean that calls
into web-services, and I'm not sure how to answer it.
I suggest posting your question to the webservice newsgroup,
also check out dev2dev.bea.com for examples.
Tom, BEA
Paul wrote:
> I'm q'ing msgs up and would like to use a message driven bean to forward them to
> an external web service. Weblogic workshop does not seem to support web service
> controls in an EJB project. Any suggestions?
>
> Thanks,
>
> Paul
Maybe you are looking for
-
After release the release version different than debug version ????
Hello guys, I am having a HUGE issue with my release build version of my application, when i run my application through eclipse it runs perfectly, however after making a release build of the application and running it behaves different than the versi
-
Re-importing 2nd copy of cd songs as AIFF
My question pertains to cd imports only. I want to re-import a large portion of my cd collection in AIFF format and sync some of those to a 2nd ipod dedicated to the larger files. Ideally, I'd just import and add to my existing AAC collection on a la
-
Is there a portable way to define POJO webservice (JAX-WS 2.0)in Java EE 5?
I would like to use JAX-WS 2.0 annotations to define POJO web services in Java EE 5 server. Implementing the service goes nicely, until I try to deploy it to the app server. It seems this step is application server specific: for Sun implementation I
-
HT2845 finger motion on magic mouse does not cause scrolling
Finger motion on magic mouse does not produce scrolling????????
-
Screen no workie again !!!!!!!!!
Bought a new iPhone on 07/10/2007. Last May the bottom touch row of the screen went dead. Went to Apple Store and they exchanged it for me. Well today the screen touch does not work. I called and they told me that my 90 day warranty expired the end o