Help with consuming a web service
Hi guys,
I'm trying to consume a web service but I have the following problem when I consume it:
javax.xml.rpc.soap.SOAPFaultException: Internal Error
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.ja
va:491)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:307
at qtel.tibco.transferAsset.AssetPort_Stub.transferAsset(AssetPort_Stub.
java:67)
at transferasset.Main.main(Main.java:34)
I'm using NetBeans 5.0 with JDK 1.4 and the JAX-RPC 1.6
here is my Code:
package transferasset;
import java.io.*;
import javax.xml.rpc.*;
import java.rmi.*;
* @author Administrator
public class Main {
/** Creates a new instance of Main */
public Main() {
* @param args the command line arguments
public static void main(String[] args) {
try{
System.out.println(args[0] + " " + args[1] + " " + args[2] );
qtel.tibco.transferAsset.AssetManagementServiceServiceagent service = new qtel.tibco.transferAsset.AssetManagementServiceServiceagent_Impl();
qtel.tibco.transferAsset.AssetPort port = service.getAssetPortEndpoint1();
qtel.tibco.transferAsset.TransferAssetRequest req = new qtel.tibco.transferAsset.TransferAssetRequest(args[0].toString(),args[1].toString(),args[2].toString());
qtel.tibco.transferAsset.TransferAssetResponse result = port.transferAsset(req);
System.out.print(result.getData().getReturnStatus());
}catch(javax.xml.rpc.soap.SOAPFaultException e){
//System.out.print(e.getFaultString());
//System.out.print(e.getFaultActor());
e.printStackTrace();
}catch(Exception e){
e.printStackTrace();
System.out.println(e.getMessage());
//System.out.println("exception");
//return result.getData().getReturnStatus();
}the problem is as folowwing in the command prompt when I run the following command I will have no error and the web service work fine:
java -jar "C:\updateassetinfo\dist\updateassetinfo.jar" 1 1 1
but the problem will appear if I send a character in the parametars like this:
java -jar "C:\updateassetinfo\dist\updateassetinfo.jar" 12367 3456 HC-098
So any help will be Appreciated
thanks in advance.
Hi guys,
I'm trying to consume a web service but I have the following problem when I consume it:
javax.xml.rpc.soap.SOAPFaultException: Internal Error
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.ja
va:491)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:307
at qtel.tibco.transferAsset.AssetPort_Stub.transferAsset(AssetPort_Stub.
java:67)
at transferasset.Main.main(Main.java:34)
I'm using NetBeans 5.0 with JDK 1.4 and the JAX-RPC 1.6
here is my Code:
package transferasset;
import java.io.*;
import javax.xml.rpc.*;
import java.rmi.*;
* @author Administrator
public class Main {
/** Creates a new instance of Main */
public Main() {
* @param args the command line arguments
public static void main(String[] args) {
try{
System.out.println(args[0] + " " + args[1] + " " + args[2] );
qtel.tibco.transferAsset.AssetManagementServiceServiceagent service = new qtel.tibco.transferAsset.AssetManagementServiceServiceagent_Impl();
qtel.tibco.transferAsset.AssetPort port = service.getAssetPortEndpoint1();
qtel.tibco.transferAsset.TransferAssetRequest req = new qtel.tibco.transferAsset.TransferAssetRequest(args[0].toString(),args[1].toString(),args[2].toString());
qtel.tibco.transferAsset.TransferAssetResponse result = port.transferAsset(req);
System.out.print(result.getData().getReturnStatus());
}catch(javax.xml.rpc.soap.SOAPFaultException e){
//System.out.print(e.getFaultString());
//System.out.print(e.getFaultActor());
e.printStackTrace();
}catch(Exception e){
e.printStackTrace();
System.out.println(e.getMessage());
//System.out.println("exception");
//return result.getData().getReturnStatus();
}the problem is as folowwing in the command prompt when I run the following command I will have no error and the web service work fine:
java -jar "C:\updateassetinfo\dist\updateassetinfo.jar" 1 1 1
but the problem will appear if I send a character in the parametars like this:
java -jar "C:\updateassetinfo\dist\updateassetinfo.jar" 12367 3456 HC-098
So any help will be Appreciated
thanks in advance.
Similar Messages
-
Need help with DOC type web service
hi,
I am trying to write a simple message style ( doc type ) web service but no success so far. I have tried to search for examples but no use. I already implemented some simple RPC style web services like calculator etc and able to use them. I am more interested in the DOC type ( which sends SOAP message and receives SOAP message back). Can Anybody give me an example for implementing this type of service ( very-simple say HellowWorld ) or point me to some website . I am not able to generate the response envelope. I can write the client program which will send a SOAP Envelope to this services with one parameter NAME and the services should return Hello Name but in a SOAP envelope form. I can create a SOAP message in this Client using SOAPConnection and MessageFactory etc. Your help will be really appreciated. There is very little stuff about webservices on the internet as well on this forum.
Thanks
VinodHello kwilding2,
Thanks for the quick response and pointing to some useful websites. I downloaded the code from web service essentials BUT all the examples are using SOAP RPC calls. They create a call object and call one of the service methods and a response is returned. I am little confused about this stuff. I am looking for something which returns the response in a SOAP envelope for which i think i need to use JAXM API which I already have downloaded. I have created a client which composes a SOAP envelope using SOAPConnection and other MessageFactory classes etc and can send this SOAP envelope to a web service. In return I want the web service to give the SOAP envelope.
I have gone thru xmethods.net and picked the following stock quote request and response:
Sample Request envelope:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:getQuote xmlns:ns1="urn:xmethods-delayed-quotes" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<symbol xsi:type="xsd:string">IBM</symbol>
</ns1:getQuote>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample Response Envelope:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:getQuoteResponse xmlns:ns1="urn:xmethods-delayed-quotes" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:float">133.625</return>
</ns1:getQuoteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I also want the things in this order. This webservice at xmethods just returns the price for a stock, so how they say it returns this Response Envelope. Is this Envelope something implied. I am getting more confused.
any help will be appreciated.
Thanks
Vinod -
Help with calling a web service on an external system
All right you Xi gurus, I'm a Basis guy whom has installed XI 3.0 SP13 and now I would like to get setup a fairly "real world" example. I have read the help section but it kind of hard to follow. I have followed the demo examples and they somewhat work and I followed the "XI30SP14_SimpleUse.pdf" which showed me how to do a simple file transfer and mapping but a considerable amount of work was done for me. And yesterday I received the 'SAP Exchange Infrastructure' book from SAP-Press. Thumbing through the book I see it contains detailed information on the functionality but nothing so far on how to setup the whole process of start to finish.
Here is what I would like to do...I would like to call an external web service from my R/3 4.6C system via XI. Could someone help by detailing the general steps of setting this up? Thanks in advance.Hi Kartik,
have you seen this blog by Thomas?
<a href="/people/thomas.jung3/blog/2005/01/11/publishing-abap-webservices-to-an-external-uddi-server ABAP WebServices to an External UDDI Server</a>
Regards
Raja -
Hello,
I am using a web service to do address validation. I created the web service and it ran OK, but the report always says no data found. I wanted to see what was in the returned collection, so I created a new region with the following SQL:
SELECT CLOB001
FROM wwv_flow_collections c
WHERE c.collection_name = 'P37_VALIDATECCSZ_RESULTS'
This has data in it: "Marion 0 Wayne true true 14505 1.0 AddressResponse: /Marion, NY 14505/Val = true/Rel = 1.0/Incp = true/Geo = 0 NY true"
The default report is failing because the response is not XML code I believe.
I ran the web service using java and it returns:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:validateCCSZResponse xmlns:ns="http://validation.util.oss.paetec.com">
<ns:return xmlns:ax28="http://sag.oss.paetec.com/xsd" xmlns:ax22="http://rmi.java/xsd" xmlns:ax23="http://io.java/xsd" xmlns:ax21="http://client.validation.util.oss.paetec.com/xsd" type="com.paetec.oss.util.validation.client.AddressResponseArray">
<ax21:responses type="com.paetec.oss.util.validation.client.AddressResponse">
<ax21:city>Marion</ax21:city>
<ax21:code>0</ax21:code>
<ax21:country />
<ax21:county>Wayne</ax21:county>
<ax21:incomplete>true</ax21:incomplete>
<ax21:incorporated>true</ax21:incorporated>
<ax21:locClli />
<ax21:postalCode>14505</ax21:postalCode>
<ax21:postalCodeExtension />
<ax21:reliability>1.0</ax21:reliability>
<ax21:shortDescription>AddressResponse: /Marion, NY 14505/Val = true/Rel = 1.0/Incp = true/Geo = 0</ax21:shortDescription>
<ax21:state>NY</ax21:state>
<ax21:streetName />
<ax21:streetNumber />
<ax21:unit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ax21:unit>
<ax21:validated>true</ax21:validated>
</ax21:responses>
</ns:return>
</ns:validateCCSZResponse>
</soapenv:Body>
</soapenv:Envelope>
So, does anyone know why the web service call from APEX does not return the XML code? I am getting the values from the XML code, but I have no way to parse it to get what I need...
Thanks,
-- JohnnieHey Jason,
That is very close to what the generated report looked like, as soon as I put in //validateCCSZResponse/return/responses instead of //validateCCSZResponse/return I get no data found.
You can run this directly in TOAD, this one returns a row:
SELECT extractValue( value(T), '//city', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) city
,extractValue( value(T), '//county', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) county
,extractValue( value(T), '//incomplete', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) incomplete
,extractValue( value(T), '//postalCode', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) postalCode
,extractValue( value(T), '//reliability', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) reliability
,extractValue( value(T), '//state', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) state
,extractValue( value(T), '//streetName', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) streetName
,extractValue( value(T), '//streetNumber', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) streetNumber
,extractValue( value(T), '//validated', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) validated
FROM TABLE(xmlsequence(extract(XMLTYPE.createxml('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:validateCCSZResponse xmlns:ns="http://validation.util.oss.paetec.com">
<ns:return xmlns:ax28="http://sag.oss.paetec.com/xsd" xmlns:ax22="http://rmi.java/xsd" xmlns:ax23="http://io.java/xsd" xmlns:ax21="http://client.validation.util.oss.paetec.com/xsd" type="com.paetec.oss.util.validation.client.AddressResponseArray">
<ax21:responses type="com.paetec.oss.util.validation.client.AddressResponse">
<ax21:city>Marion</ax21:city>
<ax21:code>0</ax21:code>
<ax21:country />
<ax21:county>Wayne</ax21:county>
<ax21:incomplete>true</ax21:incomplete>
<ax21:incorporated>true</ax21:incorporated>
<ax21:locClli />
<ax21:postalCode>14505</ax21:postalCode>
<ax21:postalCodeExtension />
<ax21:reliability>1.0</ax21:reliability>
<ax21:shortDescription>AddressResponse: /Marion, NY 14505/Val = true/Rel = 1.0/Incp = true/Geo = 0</ax21:shortDescription>
<ax21:state>NY</ax21:state>
<ax21:streetName />
<ax21:streetNumber />
<ax21:unit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ax21:unit>
<ax21:validated>true</ax21:validated>
</ax21:responses>
</ns:return>
</ns:validateCCSZResponse>
</soapenv:Body>
</soapenv:Envelope>'),'//validateCCSZResponse/return','xmlns="http://validation.util.oss.paetec.com"'))) T
This returns no rows:
SELECT extractValue( value(T), '//city', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) city
,extractValue( value(T), '//county', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) county
,extractValue( value(T), '//incomplete', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) incomplete
,extractValue( value(T), '//postalCode', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) postalCode
,extractValue( value(T), '//reliability', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) reliability
,extractValue( value(T), '//state', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) state
,extractValue( value(T), '//streetName', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) streetName
,extractValue( value(T), '//streetNumber', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) streetNumber
,extractValue( value(T), '//validated', 'xmlns="http://client.validation.util.oss.paetec.com/xsd"' ) validated
FROM TABLE(xmlsequence(extract(XMLTYPE.createxml('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:validateCCSZResponse xmlns:ns="http://validation.util.oss.paetec.com">
<ns:return xmlns:ax28="http://sag.oss.paetec.com/xsd" xmlns:ax22="http://rmi.java/xsd" xmlns:ax23="http://io.java/xsd" xmlns:ax21="http://client.validation.util.oss.paetec.com/xsd" type="com.paetec.oss.util.validation.client.AddressResponseArray">
<ax21:responses type="com.paetec.oss.util.validation.client.AddressResponse">
<ax21:city>Marion</ax21:city>
<ax21:code>0</ax21:code>
<ax21:country />
<ax21:county>Wayne</ax21:county>
<ax21:incomplete>true</ax21:incomplete>
<ax21:incorporated>true</ax21:incorporated>
<ax21:locClli />
<ax21:postalCode>14505</ax21:postalCode>
<ax21:postalCodeExtension />
<ax21:reliability>1.0</ax21:reliability>
<ax21:shortDescription>AddressResponse: /Marion, NY 14505/Val = true/Rel = 1.0/Incp = true/Geo = 0</ax21:shortDescription>
<ax21:state>NY</ax21:state>
<ax21:streetName />
<ax21:streetNumber />
<ax21:unit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ax21:unit>
<ax21:validated>true</ax21:validated>
</ax21:responses>
</ns:return>
</ns:validateCCSZResponse>
</soapenv:Body>
</soapenv:Envelope>'),'//validateCCSZResponse/return/responses','xmlns="http://validation.util.oss.paetec.com"'))) T -
Consuming a Web Service with WEB AS 6.40
Hello,
i try to consume a Webservice from the internet. I have configured the logical port and i created the client proxy as shown in the following real good weblog from
Thomas Jung.
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
But when i try to test the proxy in SE80 I retrieve the following error:
<CODECONTEXT>http://www.sap.com/xml_errorcodes</CODECONTEXT>
<CODE>SOAP:111</CODE>
<ERRORTEXT>Unallowed RFC-XML Tag (SOAP_EINVALDOC)</ERRORTEXT>
What's wrong here? Someone can help me?
Thanks for your help!
KlausWe had the same error message for one of our Proxy Web Service calls.
We tried to use an RFC instead of the URL, and performed a TEST CONNECTION. And low and behold, we received an error message that was much more helpful than the "Unallowed RFC-XML Tag (SOAP_EINVALDOC)" message.
The problem for us was that the Server that we were trying to consume the Web service from was blocking the IP address of our Web Application Server.
We contacted the administrator, he verified that was the case, removed the restriction, and all is good now.
Here was the message we saw when we tested it in the RFC:
The Web server you are attempting to reach has a list of IP addresses that are not allowed to access the Web site, and the IP address of your browsing computer is on this list. Please try the following: Contact the Web site administrator if you believe you should be able to view this directory or page.
Hope this helps! -
Consuming a Web Service with ABAP in WAS 6.40 (SS3)
Hi Everyone,
Has anyone successfully consumed a web service (based on an EJB) that is published to the J2EE engine of their WAS 6.40 server by creating a proxy from the ABAP layer?
We are encountering the following problem: When executing method of the proxy to call the Web Service on the J2EE engine, the CX_AI_SYSTEM_FAULT exception is triggered with the message "Unallowed RFC-XML Tag (SOAP_EINVALDOC)".
This same problem has occurred with multiple web services, even though the proxy generation seems to execute without a problem. Is there some system setting that could cause this? We have run the SOAP Runtime trace, but only receive the same basic information about the problem.
If anyone has any thoughts at all, I'd be grateful to hear them.
Thanks,
--GregHi,
We encountered problems when consuming a foreign WS. It seems to be that RPC style WSDL isn't supported by the WAS 6.4 WS proxy. An interesting reading on this is
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/the difference between rpc and document style wsdl.article
Eddy -
Consuming SAP web services with tables
I'm doing kind of feasibility study on consuming SAP web
services from CF.
So far so good, but I'm stuck dealing with tables
(import/export parameters in SAP world).
I know how to receive a table object from SAP functions:
* With Apache Axis v1.2: pass an empty CF structure as a
parameter
* With Apache Axis v1.4: pass an empty CF array as a
parameter
Then the parameter is filled with data (replaced with Java
object) and we can just parse the object accordingly.
My question here is whether or not we can pass a *table with
actual records*.
For example, I want to pass a table with multiple records to
update DB records under SAP.
I tried passing (1) CF array of structure and (2) Java
ArrayList with no chance.
The web service call itself completes without errors (no
method signature error), but the SAP function seems to see the
parameter as an empty table.
Anyone has been successful with this case?
Any suggestion would be much appreciated.Thanks Dan,
Unfortunately CF query object didn't work either.
Now I'm looking at the code generated by Flex Builder to see
how the classes are like ;-)
It's just an ArrayCollection of simple value objects
(representing a row).
So CF array of structure or Java ArrayList looks a reasonable
approach though they don't at all. -
Consuming a Web Service with PasswordDigest Authentication in ABAP
Hello,
I need to consume a web service in ABAP from a non-SAP application. The web service uses wsse:UsernameToken with PasswordDigest in the SOAP Header for authentication. However, I havent seen any documentation for using Password Digest in ABAP.
Is it possible to use Password Digest in ABAP?
Thanks
AjayHi Marc,
Here is the ABAP Code to build the SOAP header.
FUNCTION Z_GET_SOAP_REQUEST_HEADER.
*"*"Local Interface:
*" EXPORTING
*" VALUE(ER_SECURITY_ELEMENT) TYPE REF TO IF_IXML_ELEMENT
*date and time data
data: lv_sys_date like sy-datum,
lv_sys_time like sy-uzeit,
lv_year(4) type c,
lv_month(2) type c,
lv_date(2) type c,
lv_hour(2) type c,
lv_min(2) type c,
lv_sec(2) type c.
data : lv_created type string,
lv_snonce type string,
lv_b64nonce type string,
lv_webservice_password type string,
lv_webservice_userid type string,
lv_spassword type string,
lv_xpassword type xstring,
lv_hpassword type hash160x,
lv_b64password(255) type c,
lv_xpasslen type i,
lv_hpasslen type i.
*xml declartions
data : lv_sheader type string,
lv_xheader type xstring,
xml_document TYPE REF TO if_ixml_document,
xml_root TYPE REF TO if_ixml_element,
xml_element TYPE REF TO if_ixml_element,
xml_node TYPE REF TO if_ixml_node.
*get the c-link password.
CALL METHOD ZCL_CDB_SYNC_CFG_READER=>GET_USERID_PASSWORD
IMPORTING
EV_USER_ID = lv_webservice_userid
EV_PASSWORD = lv_webservice_password
*Evaluate created date time
lv_sys_date = sy-datum.
lv_sys_time = sy-uzeit.
lv_year = lv_sys_date(4).
lv_month = lv_sys_date+4(2).
lv_date = lv_sys_date+6(2).
lv_hour = lv_sys_time(2).
lv_min = lv_sys_time+2(2).
lv_sec = lv_sys_time+4(2).
CONCATENATE lv_year '-' lv_month '-' lv_date 'T' lv_hour ':' lv_min ':' lv_sec '.000Z' into lv_created.
*Create and encode the nonce
CALL FUNCTION 'GENERAL_GET_RANDOM_STRING'
EXPORTING
NUMBER_CHARS = 24
IMPORTING
RANDOM_STRING = lv_snonce.
CALL METHOD cl_http_utility=>ENCODE_BASE64
EXPORTING
UNENCODED = lv_snonce
RECEIVING
ENCODED = lv_b64nonce.
*create the password to be sent to web service
CONCATENATE lv_snonce lv_created lv_webservice_password into lv_spassword.
*encode password to xstring
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = lv_spassword
IMPORTING
BUFFER = lv_xpassword.
lv_xpasslen = xstrlen( lv_xpassword ).
CALL FUNCTION 'CALCULATE_HASH_FOR_RAW'
EXPORTING
ALG = 'SHA1'
DATA = lv_xpassword
LENGTH = lv_xpasslen
IMPORTING
HASHX = lv_hpassword
HASHXLEN = lv_hpasslen.
CALL FUNCTION 'SCMS_BASE64_ENCODE'
EXPORTING
INPUT = lv_hpassword
INPUT_LENGTH = lv_hpasslen
IMPORTING
OUTPUT = lv_b64password
EXCEPTIONS
OUTPUT_TOO_SMALL = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* build the header
CONCATENATE
'<soap-env:Header xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">'
'<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'
'<wsse:UsernameToken wsu:Id="########" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'
'<wsse:Username>'
lv_webservice_userid
'</wsse:Username>'
'<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'
lv_b64password
'</wsse:Password>'
'<wsse:Nonce>'
lv_b64nonce
'</wsse:Nonce>'
'<wsu:Created>'
lv_created
'</wsu:Created>'
'</wsse:UsernameToken>'
'</wsse:Security>'
'</soap-env:Header>'
INTO lv_sheader.
*Build the xml header element
lv_xheader = cl_proxy_service=>cstring2xstring( lv_sheader ).
TRY.
CALL FUNCTION 'SDIXML_XML_TO_DOM'
EXPORTING
xml = lv_xheader
IMPORTING
document = xml_document
EXCEPTIONS
invalid_input = 1
OTHERS = 2.
IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
xml_root = xml_document->get_root_element( ).
er_security_element ?= xml_root->get_first_child( ).
gr_soap_security_header = er_security_element.
ENDIF.
CATCH cx_ai_system_fault .
ENDTRY.
ENDFUNCTION. -
Consuming a web service in Oracle9i with JAX-RPC calling
Hello,
i need to generate web service client in oracle9i db using jpublisher. And i found in this tutorial http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm that Oracle 9i is not supporting JAX-RPC web services calling, because of JDK 1.3.
Is there any possibility to consume a web service using JAX-RPC instead of Oracle SOAP in Oracle 9.2 database ?I use utl_http pl/sql supplied package for this need - http://akdora.wordpress.com/2007/08/03/calling-a-web-service-by-plsql-utl_http/
But I believe you may find more information with these resource -
http://www.oracle.com/technology/sample_code/tech/java/web_services/index.html
http://forums.oracle.com/forums/forum.jspa?forumID=97
http://forums.oracle.com/forums/forum.jspa?forumID=99
http://www.oracle.com/technology/sample_code/tech/java/jsp/dbwebservices.html
Best regards. -
SOAPFaultException with wsse:Security Tag consuming a Web-Service
hello,
i'm trying to consume a Web-Service of a Document-Server implementing the new CMIS-Interface.
When i call the Service i get the exception:
javax.xml.ws.soap.SOAPFaultException: An error was discovered processing the <wsse:Security> header
my code (in an EJB 3.0 of NWCE 7.1 CE Server) is as follows:
@Stateless(name="DocRepBean")
public class AlfRepBean implements DocRepLocal {
@WebServiceRef(name="RepositoryService")
private RepositoryService rService;
public String repServiceList ()
String result = "";
RepositoryServicePort rPort = rService.getRepositoryServicePort();
try
String rList = "";
for (CmisRepositoryEntryType rEntry : rPort.getRepositories())
rList = rList + "REntry:ID="+rEntry.getRepositoryID()+";Name="+rEntry.getRepositoryName()+";URI="+rEntry.getRepositoryURI()+":";
result = rList;
catch (Exception ex)
result = "!Exeption:" + ex.toString();
ex.printStackTrace();
// here the exception is thrown
return result;
Is there maybee a problem with authentification? but how can i set user and password calling that service then?
Sorry for this maybe easy questions but i'm new in consuming other webservices.
regards
matthias haykFound solution for this particular problem myself but ran into an follow-up error
-
Consuming Java Web Service with complex return types
Hi,
I'm consuming a Java Web Service and the return I get in
ColdFusion is a typed Java Object (with custom Java classes like
com.company.project.JavaClass ...)
Within this object I don't get direct accessible properties
as when I'm consuming ColdFusion Web Services, instead I get a
getPROPERTYNAME and setPROPERTYNAME method for each property.
How can I handle this? I don't want to call this methods for
each property (and there are nested objects with arrays of custom
classes below, which would really make this complicated).
What's the best way to cope up with this?
Thanks a lot,
FritzThe web service is actually the function, not the cfc and you
didn't show a function.
My own opinion is that since webservices by definition should
be available to any calling app (cold fusion, .net, flash, etc),
whatever gets returned from the method should be as universally
recognizable as possible. This generally means text, numbers,
boolean, or xml. -
Consuming a web service with header
Hi
I am trying to consume a web service in BIP.
But the problem is that the authentication is in the header of the SOAP, it does not take the values provided in username/password field in complex type service.
(However i am able to see the methods in the body of the web service.)
hence i get an error "username not specified"
how do i pass the credentials in the header of the soap?
I am using BIP 10.1.3.4This is the output at the oc4j when I try to execute:
After WSS soapMessage = <soap:Envelope xmlns:soap="http://sche
mas.xmlsoap.org/soap/envelope/">
*<soap:Header></soap:Header>*
<soap:Body xmlns:ns1="urn:XYZ_Request">
<ns1:OpGet>
<ns1:Request_ID>000000000000019</ns1:Request_ID>
</ns1:OpGet>
</soap:Body>
</soap:Envelope>
Notice that Header is null. I want to pass the authentication in the header. -
Consuming a web service with an applet...
Hi, Ive created an applet in netbeans 5.5, which consumes a web service - it works 100% "run file" in the ide, but when i look at it via web browser, it seems the webservice object cannot be instantiated. I'm guessing I need to somehow include jax-ws objects in my deployment, but how do I do this? - I'm a little out of my depth here, so please explain thoroughly
ThanksHi,
We encountered problems when consuming a foreign WS. It seems to be that RPC style WSDL isn't supported by the WAS 6.4 WS proxy. An interesting reading on this is
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/the difference between rpc and document style wsdl.article
Eddy -
Handling of SOAP Faults in SOAP Clients consuming PI Web services
Hi there,
the following is in regards to SOAP fault error handling in a SOAP client that consumes a Web Service published by PI.
I have been reading a number of threads and blogs in regards to this topic and I am still left with some open questions which I hope to get some final answersclarifications through this thread.
In particular the blogs
Handling Web Service SOAP Fault Responses in SAP NetWeaver XI - Handling Web Service SOAP Fault Responses in SAP NetWeaver XI
XI: Propagation of meaningful error information to SOAP Client - XI: Propagation of meaningful error information to SOAP Client
have caused by attention.
Both of these threads are realating to the Fault Message type one can use to return errors back to a SOAP Client (.Net, Java, etc.).
In our scenario we published a number of Web Services through PI that provide functionality to integrate with an R3 back-end system using inbound ABAP Proxies.
The services are standardised and will be consumed by a number of .NetJava applications and systems. The reason for the use of ABAP proxies is the customer specific application logic that is executed in the backend system. The Web services are synchronous and don't use ccBPM in the middle. Transformations are performed in PI combined with various lookups to set default values before the message is passed into the ABAP Framework of the R3 back-end system. The lookups are done against the R3 back-end system using the PI RFC Lookup feature.
The inbound proxies currently return application errors as part of the response message back to the SOAP client. For more critical errors we introduced the use of Fault message types as the method to return the information back to the SOAP Client. This is all working satisfactory.
The questions I have are as follows.
1. When an error occurs at the IE level (e.g. mapping error), ABAP Proxy framework level (e.g. conversion from XML to ABAP format) or Adapter Framework level (Adapter releated error) a different SOAP fault message structure is returned to the SOAP Client than the one used for the application errors. The SOAP fault message structure used in this case is the standard SOAP fault used by PI to return system errors back to the caller. For those SOAP fault messages there is no payload generated that could be mapped to the SOAP fault structure used for the application errors. This would be preferrable as there would be only one Fault message structure used for both inbound ABAP proxy generated fault messages and PI generated fault messages.
Also the error messages generated by PI can be quite cryptic and difficult to interpret at the client end and could be filtered ranslated during message mapping if the payload of the PI generated SOAP fault message could be accessed in a message mapping.
Point 3 of the above thread 2759 indicates that this would be possible but doesn't outline how. Could somebody please clarify this for me as I don't believe that this is really possible ???.
My idea instead was to use the PI SOAP fault message structure to also return application errors. Therefore I would create a Fault message type that matches the PI SOAP fault structure. This would enable the SOAP Client to handle only one SOAP Fault error structure. Would that be something to look into instead ?????.
2. We have been looking at using the integrated WEB AS SOAP adapter instead of using the AF Sender SOAP adapter. While playing with this we encountered differences in the content returned through the SOAP fault generated by PI. A sample is below. Shouldn't the content of these SOAP faults be the same if the error that caused it is the same. Also the SOAP fault returned by the IE SOAP adapter is much more useful in this particular case. Both errors below are the same, a conversion error from XML to ABAP took place in the inbound ABAP proxy framework of the back-end system.
SOAP fault returned when using SOAP Sender adapter of AF
<!see the documentation>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>ADAPTER.JAVA_EXCEPTION</code>
<text>com.sap.aii.af.ra.ms.api.DeliveryException: XIProxy:PARSE_APPLICATION_DATA:
at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)
at com.sap.aii.af.ra.ms.impl.core.queue.consumer.CallConsumer.onMessage(CallConsumer.java:134)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:916)
at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
SOAP fault using integrated SOAP adapter of PI IE
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>System Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context/>
<code>ABAP.PARSE_APPLICATION_DATA</code>
<text>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXSBE20FF604BAFEF8D990A XML Bytepos.: 564 XML Path: ns1:CreatePORequest(1)POHEADER(2)COMP_CODE(1) Error Text: Data loss occurred when converting ############################## Kernel ErrorId: CONVT_DATA_LOSS))</text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
I have been reading threads for hours without being able to find one that answers questions 1 or provides a blog that outlines the approach one should take for error handling in SOAP clients that consume PI Web Services (and covers both PISystem generated faults and faults raised in Proxies).
There may already be a blog or thread and I just missed it.
Any comments are welcome.
Thanks. DieterHi Dieter,
As Bhavesh already mentioned fault messages are used for application errors. The same is described in SAP XI help:
http://help.sap.com/saphelp_nw04/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
In case of system error (e.g. field length too long in proxy call or error in XI/PI mapping) there seems to be no standard way of handling it and propagating the response to the consumer of webservice.
Each system error is not recognized by SOAP adapter and SOAP adapter exception is raised.
The only bizzare solution that I can see is developing an adapter module and transport wrong message to standard fault message before delivering it to adapter engine:
http://help.sap.com/saphelp_nw04/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
Kind regards,
Wojciech
btw nice thread -
How to install and consume GroupWise Web Service (SOAP)
Hello! I'm Razvan, programmer from Romnia, and I am new to GroupWise development.
I am asking if anyone could help me with a C# Visual Studio 2010 example of how to install and consume GroupWise Web Service (SOAP).
The documentation from novell site didn't help me, i didn't understant much of it.
All I need is either a link to a documented GroupWise C# developer step-by-step tutorial, or some code examples.
Can you please show me some code examples in C# with:
1)loging in using a username and a password,
2)retrieving contact list,
3)retrieving appointment list,
4)sending a mail,
5)setting an appointment
I don't know how to use "groupwise.wsdl" and customise it so that it points to our GroupWise server.
Please, I really need this because I am working at a project right now which involves GroupWise integration.
I hope I haven't disturbed anyone with my simple question.
I know this might be a very simple question given the complexity of the other posts here, but that's why I really hope I will get an answer soon.
Thank you very much!
Signature:
How old is the Orthodox faith?
How old is the orthodox faith?Just a comment.
The value for the version element should be "1.02"
not "1.2".
Preston
>>> On Tuesday, March 01, 2011 at 8:06 AM,
TheRomanian<[email protected]> wrote:
> I have great news! After strong documentation yesterday and today, I've
> just made a successfull example that actually connects to our GroupWise
> server.
>
> I made it in PHP.
>
> I need an ASP.NET + C# application, but now is very simple to convert
> it. I post the PHP code here for other people who in future might be
> interested in finding out.
>
> So a simple PHP GroupWise Login code using "groupwise.wsdl" web
> service:
>
>
> require_once('./GWService/GroupwiseService.php');
> require_once('FB.class.php');
>
> $classmap = array(
> 'Authenication' => 'Authenication',
> 'PlainText' => 'PlainText',
> 'loginRequest' => 'loginRequest',
> 'loginResponse' => 'loginResponse',
> 'logoutRequest' => 'logoutRequest',
> 'logoutResponse' => 'logoutResponse',
> 'UserInfo' => 'UserInfo',
> );
>
> $gwservice = new GroupwiseService(
> "./WSDL/groupwise.wsdl",
> array(
> "location" => "http://11.150.40.78:8756/soap",
> *Your GroupWise server IP:
> and PORT*
> "classmap" => $classmap,
> "trace" => true)
> );
>
> // do login
> $pt = new PlainText();
> $pt‑>username = *"YOUR GROUPWISE USERNAME"*;
> $pt‑>password = *"YOUR GROUPWISE PASSWORD"*;
>
> $lr = new loginRequest();
> $lr‑>auth = $pt;
> $lr‑>language = "en";
> $lr‑>version = "1.2";
> $lr‑>application = "phpClient";
>
> $lres = $gwservice‑>loginRequest($lr);
> //print_r($lres);
>
>
> I Hope this will help others.
>
> ‑‑
> Signature:
>
> How old is the Orthodox Faith?
> 'How old is the orthodox faith?'
> (http://www.orthodoxphotos.com/history.shtml)
Maybe you are looking for
-
DPM 2012 R2 Repoting Protection Status as OK but no replica exists for the volume
2012R2 server running 2012R2 DPM. I am using LeftHand SAN as my DPM disks for storing backups. Our production SAN is an EMC VNX5300. I have created a mount point of a LUN and attached it to the DPM server. I have attached a snapshot to the mount poin
-
KB11N entry to be posted for large number of WBS elements
Hi, As a requirement for our client, we need to make a transfer entry from one WBS element to another WBS element using KB11N. There will be thousands of these transfers to be made at every month end. We want to write a program which will calculate t
-
Is There A Subscription That Covers From The Phili...
I just hired someone to make calls to the UK for me. She lives in the Philippines and I have setup a Skype account for my business for her to use. I would like to setup a monthly unlimited world subscription but from what I have read here I do not th
-
Why won't my apps update?
I don't have wi-fi, but I thought that connecting to a computer via a usb cord, I'd still be able to get my apps to function and/or update, but they don't. I can't figure out what the difference between a wi-fi connection and a direct connection is t
-
Hi all I have nokia 6500slide, and recently on the front of the display screen next to battery icon, there is a new icon which I have never seen before and it's not in manual. I will do my best to describe it. It's size of a small alarm bell (as on t