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
Similar Messages
-
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 -
UWL connector: problems with calling a web service with a SAPLOGONTICKET
Hi,
I want to implement a uwl connector that calls a web service to retrieve the uwl items data with a SAPLOGONTICKET. If I refresh the UWL I get the following error.
An error occured while reading data from the destination sap.com/com.xxxx.connector.RequestLeaveDP/com.xxxx.connector.RequestLeave/Config1Port_Document. The error was: com.sap.security.core.client.ws.SSO2Exception No SAP Logon Ticket was found for the user. Please ensure the user authenticated using HTTP/HTTPS and the JAAS login stack has been configured correctly. As an alternative, consider changing the authentication type to Assertion Ticket. .
If I call the Web Service in an iView I don't get this error. Maybe the UWL calls the web service not with the current authenticated user.
I tried the following code, to get the current SSO2 Ticket from the current user. It looks like, that is the current user, but the web service will not accept this. (testing purpose)
com.sap.security.api.IUser currentUser = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser();
String logonTicketUwlUser = (String) context.getUser().getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
String logonTicketCurrentUser = (String) currentUser.getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
InitialContext contextWebService = new InitialContext();
RequestLeaveWebService requestLeaveWebService = (RequestLeaveWebService) contextWebService.lookup(wsClient);
RequestLeaveWebServiceViDocument webServiceEndPoint = requestLeaveWebService.getLogicalPort("Config1Port_Document");
UWLHolidayItem holidayItem = webServiceEndPoint.getHolidayItem("");
Any ideas?
Regards
Markus
Edited by: Markus Karsch on Oct 18, 2008 11:15 PMAre you calling invoke()?
Do you have the port type in the servlet context? -
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 -
Issue with Calling Rest Web Service using Designer workflow
Hello all
I am calling a Rest web service- HTTP Post (yammer API)-
http://www.yammer.com/api/v1/messages.json?data-app-id=myappid&group_id=groupid&body=MyPost in yammer using sharepoint 2013 designer workflow.(My Requirement is to create a yammer post when I approve an item in sharepoint).
but my header parameters are creating issue while executing workflow.
Currently I have these many parameters configured in request header
Accept -application/json; odata=verbose
Content Type -application/json; odata=verbose
content length header -255
Is there anything wrong or I need to additionally pass some values in call web service action?
Any help would be highly appreciatedHi Mahesh,
One you are missing is authentication token or credentials.
Please refer to the following articles.
http://www.cleverworkarounds.com/2014/02/05/tips-for-using-spd-workflows-to-talk-to-3rd-party-web-services/
A Series of articles related to Web Service in SPD Workflow
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 1
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 2
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 3
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 4
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 5
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 6
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 7
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 8
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 9
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 10
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 11
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 12
Please don't forget to mark it answered, if your problem resolved or helpful -
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. -
Error [TOPLINK-6007] while calling a web service deployed on external oc4j
hello everybody,
Actually, I'm working on a project using oracle soa suite.
I developped a web service that works fine when I deploy it using the embeded oc4j but when I deploy it on an external oc4j, I get the followed error:
Internal Server Error (Caught exception while handling request: Exception [TOPLINK-6007] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.QueryException Description de l'exception : Descripteur absent pour [class riad.commun.bean.rh.agents.Agents]. Interrogation : ReadObjectQuery(riad.commun.bean.rh.agents.Agents))
Can anyone help me? please it's urgent.........Hello,
The error is stating there isn't a descriptor for the Agent class the app is trying to execute a query on. This could be due to improper mappings, but assuming Agent is mapped, is more likely due to a classloader issue. TopLink uses the classloader at login to initialize the descriptors and hash them on the Class objects. If the application uses a different classloader, descriptors will not be found for classes loaded from the new classloader. How are you obtaining sessions, and where is the session being used?
Best Regards,
Chris -
Calling a web service In Netweaver 7.0 abap stack through an external alias
Hello,
In CRM 2007 (Netweaver 7.0 abap stack SP 16), we have defined a web service from a module function using the wizard and configuring it with SOAMANAGER.
This web service works great when calling it with the "official" URL, something like :
http://host.domain:port/sap/bc/srt/rfc/sap/zwebservice/client/zoperation/zbinding
We would like to use a more simple URL. So with SICF, I have created an external alias /zwebservice which points to the "official" URL.
The problem is that it does not work. I get every time an HTTP 500 error code and an error Message
u201CThe configuration of the http server is missingu201D.
Do you think that it is possible to call a web service through an external alias ?
Thanks in advance for any ideas or solution !
OlivierSeems that no one has tried it...
I close the question. -
Urgent - How to call a Web Services from PLSQL - Please help
Hello,
I am very much new to WebServices, need to call web services through PLSQL. I have a urgent requirement, where i need to call the web services by passing from some paramters to it and the web services will return a varchar values as 'PASSED' or 'FAILED'.
Can you please approch me the best way to start with.
Thanks,
Srikanth.Hi,
I need to do it from PLSQL API's not from JAVA.
I have started developing the code through UTIL_HTTP. Getting lots of error.
Can you please guide me through these error.
Below is the wsdl and a blcok where i am trying to retrive the value from webservice.
Hope this will help you.
Code:
declare
soap_request varchar2(30000);
soap_respond varchar2(30000);
http_req utl_http.req;
http_resp utl_http.resp;
resp XMLType;
i integer;
begin
soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:soapCheckRequest1 wsdl:ns1="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<FirstName xsi:type="xsd:string">saddam</FirstName>
<LastName xsi:type="xsd:string">hussein</LastName>
<companyName xsi:type="xsd:string">samueladams</companyName>
<address1 xsi:type="xsd:string">123 APT</address1>
<address3 xsi:type="xsd:string">Atlanta</address3>
<city xsi:type="xsd:string">uk</city>
<stateOrRegion xsi:type="xsd:string">GA</stateOrRegion>
<postalCode xsi:type="xsd:string">30338</postalCode>
<email xsi:type="xsd:string">sj@samueladams</email>
<isoCountryCode xsi:type="xsd:string">US</isoCountryCode>
<endUserIP xsi:type="xsd:string">209.134.168.203</endUserIP>
</ns1:soapCheckRequest1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
http_req:= utl_http.begin_request
( 'http://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService'
, 'POST'
, 'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
utl_http.set_header(http_req, 'SOAPAction', ''); -- required to specify this is a SOAP communication
utl_http.write_text(http_req, soap_request);
http_resp:= utl_http.get_response(http_req);
DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response---------------------');
DBMS_OUTPUT.PUT_LINE('http_resp.status_code is :'||http_resp.status_code );
DBMS_OUTPUT.PUT_LINE('http_resp.reason_phrase is :'||http_resp.reason_phrase);
DBMS_OUTPUT.PUT_LINE('http_resp.http_version is :'||http_resp.http_version);
DBMS_OUTPUT.PUT_LINE('http_resp.private_hndl is :'||http_resp.private_hndl);
DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response----------------------');
utl_http.read_text(http_resp, soap_respond);
utl_http.end_response(http_resp);
resp:= XMLType.createXML(soap_respond);
resp:= resp.extract('/soap:Envelop/soap:Body/child::node()'
, 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
i:=0;
loop
dbms_output.put_line(substr(soap_respond,1+ i*255,250));
i:= i+1;
if i*250> length(soap_respond)
then
exit;
end if;
end loop;
end;
Error Message
http_resp.reason_phrase is :Internal Server Error
http_resp.http_version is :HTTP/1.1
http_resp.private_hndl is :0
-------utl_http.get_response----------------------
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultco
apenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXParseException: The prefix "ns1" for element "ns1:soapCheckRequest1" is not bound.</faultstring><detail><ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">atlcms
2.iss.net</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:intf="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)
-->
- <wsdl:message name="soapCheckResponse1">
<wsdl:part name="soapCheckReturn" type="soapenc:string" />
</wsdl:message>
- <wsdl:message name="soapCheckRequest1">
<wsdl:part name="firstName" type="soapenc:string" />
<wsdl:part name="lastName" type="soapenc:string" />
<wsdl:part name="companyName" type="soapenc:string" />
<wsdl:part name="address1" type="soapenc:string" />
<wsdl:part name="address2" type="soapenc:string" />
<wsdl:part name="address3" type="soapenc:string" />
<wsdl:part name="city" type="soapenc:string" />
<wsdl:part name="stateOrRegion" type="soapenc:string" />
<wsdl:part name="postalCode" type="soapenc:string" />
<wsdl:part name="email" type="soapenc:string" />
<wsdl:part name="phone" type="soapenc:string" />
<wsdl:part name="isoCountryCode" type="soapenc:string" />
<wsdl:part name="endUserId" type="soapenc:string" />
<wsdl:part name="endUserIP" type="soapenc:string" />
<wsdl:part name="endUserSession" type="soapenc:string" />
<wsdl:part name="performGovCheck" type="xsd:boolean" />
<wsdl:part name="sendEmailNotification" type="xsd:boolean" />
<wsdl:part name="screeningLevelBasedOnSuppliedCountryCode" type="xsd:boolean" />
<wsdl:part name="screeningLevelBasedOnEndUserIP" type="xsd:boolean" />
<wsdl:part name="soundexMatch" type="xsd:boolean" />
</wsdl:message>
- <wsdl:message name="soapCheckRequest">
<wsdl:part name="firstName" type="soapenc:string" />
<wsdl:part name="lastName" type="soapenc:string" />
<wsdl:part name="companyName" type="soapenc:string" />
<wsdl:part name="address1" type="soapenc:string" />
<wsdl:part name="address2" type="soapenc:string" />
<wsdl:part name="address3" type="soapenc:string" />
<wsdl:part name="city" type="soapenc:string" />
<wsdl:part name="stateOrRegion" type="soapenc:string" />
<wsdl:part name="postalCode" type="soapenc:string" />
<wsdl:part name="email" type="soapenc:string" />
<wsdl:part name="phone" type="soapenc:string" />
<wsdl:part name="isoCountryCode" type="soapenc:string" />
<wsdl:part name="endUserId" type="soapenc:string" />
<wsdl:part name="endUserIP" type="soapenc:string" />
<wsdl:part name="endUserSession" type="soapenc:string" />
<wsdl:part name="performGovCheck" type="xsd:boolean" />
<wsdl:part name="sendEmailNotification" type="xsd:boolean" />
<wsdl:part name="screeningLevelBasedOnEndUserIP" type="xsd:boolean" />
<wsdl:part name="soundexMatch" type="xsd:boolean" />
</wsdl:message>
- <wsdl:message name="soapCheckResponse">
Thanks and Regard,
Srikanth -
Calling a web service with URL to Insert into DB Web service
Does any one have an idea how I can call a web service using a URL to insert records into an Oracle DB table.
Something like this :
http://apex.oracle.com/pls/apex/SCHEMA/URI/HANDLER/PARAMETERS
I need to call it outside of Oracle Apex.
Regards,
OLUHi Swapna,
from your screenshot it seems that you actually try to call the service in your Data Source Expression field. You should set path to the WSDL file here actually - this could be either URL to SAP or to filesystem, as Anton suggested (this could be faster). Have you created endpoint binding for your service in transaction SOAMANAGER? If yes, then simply download the corresponding WSDL with binding or copy the URL which leads to it. But also test whether you are able to retrieve the WSDL without logging into SAP (close all browser windows and then open a new one otherwise session ID from other browser windows can be reused).
If you have to give username and password, then setup anonymous alias in transaction SICF, for example.
Pleas, check my previous post on the same subject here: Re: BCM7 IVR : SOAP request for client identification in CRM .
Maybe it could help.
Regards,
Dawood. -
Help calling a web service from pl/sql
Hi, i have a web service that is called from a php, i needed to do this but from pl sql:
this is the call of web service from php:
<?PHP
//Variables de prueba - Se tienen que tomar los valores de la base de datos, de la compra y el usuario
$p_id_emec=urlencode("33355555"); //Identificador del sitio dentro de Pago Fácil
$p_id_operacion=urlencode("151"); //Identificador unívoco de la compra en el sitio
$p_id_mone_ecom=urlencode("01"); //Identificador de moneda - '01'=pesos - '02=dolares
//Inicializa Variables de URL
$serviceName="Pago XX";
$protocol="http://";
// DESARROLLO
$ipUrl="desa.e-pagoxx.com";
$port=80;
//Llamada
$call="/2130/index.php";
//Abro la conexion al port
$URLsola = $protocol.$ipUrl;
//Concatenacion del string
$txtURL = $protocol.$ipUrl.$call;
$txtURL .="?p_id_emec=".$p_id_emec;
$txtURL .="&p_id_operacion=".$p_id_operacion;
$txtURL .="&p_id_mone_ecom=".$p_id_mone_ecom;
$txtURL = $txtURL;
//* Se comunica con el servidor, pasa los datos y recibe el HTML con el comprobante *//
$fp = fsockopen($ipUrl, $port, &$errno, &$errstr, 30);
if(!$fp)
echo "No me puedo comunicar con $serviceName";
exit;
else
$file=@fopen($URLsola,"r");
$pageData=file($txtURL);
for($i=0;$i<count($pageData);$i++)
$sText.=$pageData[$i];
@fclose($file);
@fclose($fp);
echo($sText);
?>
I need to call this webservice from pl sql
any ideas?
thanks!!Madhu BR wrote:
You might want to try the webservice call using utl_http specified here : http://orclpps.blogspot.com/2007/12/invoking-webservices-from-oracle-9i-or.html
Or even to expand on that to deal with responses larger than 32K...
-- skeleton code
PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
soap_request VARCHAR2(30000);
soap_respond CLOB;
http_req utl_http.req;
http_resp utl_http.resp;
resp XMLType;
soap_err exception;
v_code VARCHAR2(200);
v_msg VARCHAR2(1800);
v_len number;
v_txt Varchar2(32767);
BEGIN
IF p_proxy IS NOT NULL THEN
UTL_HTTP.SET_PROXY(p_proxy);
END IF;
-- Define the SOAP request according the the definition of the web service being called
soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'||
' <SOAP-ENV:Body>'||
' <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
' <m:UserName>'||p_username||'</m:UserName>'||
' <m:Password>'||p_password||'</m:Password>'||
' </m:DownloadRequest>'||
' </SOAP-ENV:Body>'||
'</SOAP-ENV:Envelope>';
http_req:= utl_http.begin_request
( 'http://www.website.net/webservices/GetDetailsService.asmx'
, 'POST'
, 'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml');
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
utl_http.write_text(http_req, soap_request);
http_resp:= utl_http.get_response(http_req);
utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
LOOP
utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
soap_respond := soap_respond || v_txt; -- build up CLOB
END LOOP;
utl_http.end_response(http_resp);
resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
END; -
Calling a Web Service with a File Binding Component
Is it possible to call a web service (inside a bpel process) using a File Binding Component?
It seems that the File Binding Component should read an XML representing the input - is this possible? I found something about an "input-file-type" for the message, is this the way?
Thank you,
Marcos AckelHi
" have done one small application with Bpel which read messages from port and write to file in xml format using file binding........"
By your description of this application, I'm sure it is using the HTTP BC to read incomming messages, and then the File BC to write them to a file. I think the original question is whether the File BC can call a web service which is very different.
Either way, when calling Web services, the recommended BC is the HTTP BC.
Cheers
Paul -
Call ABAP Web Service with Java code only
Hi all,
First of all, I am writing script in Adobe form but am not using the one in SAP.
I am trying to call the web service and process the result with script open (i.e. no dataconnection created), because I am trying to do that in a dialog.
I can call a non-SAP web service without problem, but I am not able to call a simple web service with only a single string input, anyone have any example?
Here is the SOAP for input:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">
<soapenv:Header/>
<soapenv:Body>
<urn:Z_RFC_GET_STAFF_BANK_INFO>
<A_STAFF_ID>0123456</A_STAFF_ID>
</urn:Z_RFC_GET_STAFF_BANK_INFO>
</soapenv:Body>
</soapenv:Envelope>
Here is my code to call:
var cURL = "http://some-host-name:port/sap/bc/srt/wsdl/bndg_DEDB492BB032E7F1B09F001CC4FBCEC9/wsdl11/allinone/ws_policy/document?sap-client=300";
var response = SOAP.request(
cURL: cURL,
oRequest: {
"urn:sap-com:document:sap:rfc:functions:Z_RFC_GET_STAFF_BANK_INFO": {
A_STAFF_ID: "0123456"
Regards
BillHello I have the same problem, were you able to execute the WS through the JS code now?
I would like to call an ABAP WS using JavaScript to return complex structures that I would like to manage directly with JS.
I tried with this code and I get the error "RaiseError: Acrobat Raise." when the request is executed:
var WSUrl = "http://<server>:<port>/sap/bc/srt/wsdl/bndg_4D15C75529330AF1E10000000A150429/wsdl11/allinone/ws_policy/document?sap-client=500";
var VendorNumber = xfa.form.DATA.DATAFLOW.SF_HEADER.VENDOR_NUMBER.rawValue;
try {
// Create request structure, read Input out of text field
var request = {
"urn:sap-com:document:sap:soap:functions:mc-style:ZWsTest" : {ILifnr: VendorNumber}
SOAP.wireDump = true;
// Call web service using SOAP object
var response = SOAP.request ({
cURL: WSUrl,
oRequest: request
// cAction: "urn:sap-com:document:sap:soap:functions:mc-style"
} catch (e) {
xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
with this other code I get the error "SOAPError: CX_ST_MATCH_ELEMENT:XSLT exception.System expected element 'ILifnr'":
try {
var myProxy = SOAP.connect(WSUrl);
var result = myProxy.ZWsTest( { ILifnr: VendorNumber } );
xfa.form.DATA.DATAFLOW.SF_HEADER.E_DESCRIPTION.rawValue = result;
// Display the response in the console:
console.println("Result is " + result);
} catch (e) {
xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
in the second option, if I make the field ILifnr optional the call is succesfully performed but the parameter is not passed to the WS. So the call is working.
Using stand-alone LiveCycle designer 8.1 and Adobe Reader 8
Any suggestions?
Many thanks,
G.
Edited by: Guillem Mateu Navalón on Jan 13, 2011 1:13 PM -
Calling a web service with two tables
Hello all,
I am having a problem calling a web service in VC which has data of the format order and orderitems.
that is I have a record of information a recordset is part of that information. Please point to any blogs or any info available on SDN.
I appreciate all your help
Thank You
ShekarHi,
Please check the below links.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/vc71/webServiceDestination.
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4679. [original link is broken] [original link is broken] [original link is broken]
Govindu -
Help needed in calling a Web service
Hi,
I want to call a web service from my component. The called web service might have different names, therefore I don't want to use the proxy class way.
I am facing problem in parsing the input parameters from the wsdl file. I have attached the wsdl file at the end.
I am using the javax.wsdl.xml.WSDLReader(axis). I have been able to parse all the bindings, ports and messages but
1. i am not able to parse the wsdl:types to obtain the input parameters
//javax.wsdl.Operation op obtained from the port which alternatively obtained from Definition
Message inputs = op.getInput().getMessage();
Part part = null;
// let's find the input params
Map inputParts = inputs.getParts();
// create the object array which Axis will use to pass in the parameters
inputParams = new Object[inputParts.size()];
s = inputParts.keySet();
it = s.iterator();
int i = 0;
while(it.hasNext())
part = (Part) inputParts.get(it.next());
Afetr performing this, i have no clue as to how to parse the input parameters.
2. How will i generate the java Objects array from these input parameters to pass to the Call.invoke function, i.e.
Call call = (Call) service.createCall();
call.setOperation(portQN, operationName);
Object ret = (Integer) call.invoke(inputParams);
The function takes an object[] as input but since i have complex types involved in wsdl, so how will this object array needs to be populated
WSDL file:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://V4_0.testcenter8" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax258="http://testcenter8.V4_0.testcenter8/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax257="http://V4_0.testcenter8/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://V4_0.testcenter8">
<wsdl:types>
<xs:schema xmlns:ax260="http://V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8">
<xs:import namespace="http://V4_0.testcenter8/xsd" />
<xs:element name="executeRuleset">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="param0" nillable="true" type="ax257:testcenter8_V4_0_Req" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="executeRulesetResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ax257:testcenter8_V4_0_Resp" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:ax259="http://testcenter8.V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8/xsd">
<xs:import namespace="http://testcenter8.V4_0.testcenter8/xsd" />
<xs:complexType name="testcenter8_V4_0_Req">
<xs:sequence>
<xs:element minOccurs="0" name="cabinetName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="loginReqd" type="xs:boolean" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
<xs:element minOccurs="0" name="password" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="userName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="testcenter8_V4_0_Resp">
<xs:sequence>
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://testcenter8.V4_0.testcenter8/xsd">
<xs:complexType name="Inputs">
<xs:sequence>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="subject" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Outputs">
<xs:sequence>
<xs:element minOccurs="0" name="category" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="massRequestType" type="xs:int" />
<xs:element minOccurs="0" name="subCategory" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="executeRulesetRequest">
<wsdl:part name="parameters" element="ns:executeRuleset" />
</wsdl:message>
<wsdl:message name="executeRulesetResponse">
<wsdl:part name="parameters" element="ns:executeRulesetResponse" />
</wsdl:message>
<wsdl:portType name="testcenter8_V4_0WebServicePortType">
<wsdl:operation name="executeRuleset">
<wsdl:input message="ns:executeRulesetRequest" wsaw:Action="urn:executeRuleset" />
<wsdl:output message="ns:executeRulesetResponse" wsaw:Action="urn:executeRulesetResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap11Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap12Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap12:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceHttpBinding" type="ns:testcenter8_V4_0WebServicePortType">
<http:binding verb="POST" />
<wsdl:operation name="executeRuleset">
<http:operation location="testcenter8_V4_0WebService/executeRuleset" />
<wsdl:input>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="testcenter8_V4_0WebService">
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap11Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap11Binding">
<soap:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap11Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap12Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap12Binding">
<soap12:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap12Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpEndpoint" binding="ns:testcenter8_V4_0WebServiceHttpBinding">
<http:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpEndpoint/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Regards
NitinAn update -
I want to call a web service from my component. The called web service might have different names, therefore I don't want to use the proxy class way.
I am parsing the WSDL file and obtaining the different parameters. But i am having problem in passing the parameters(receiving as well) to the web service and i am not able to find any good refernce on the internet, i am getting the following exception:
org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source)
at org.apache.axis.AxisFault.makeFault(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source)
at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
at org.apache.axis.message.MessageElement.publishToHandler(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.message.RPCElement.deserialize(Unknown Source)
at org.apache.axis.message.RPCElement.getParams(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at javaapplication17.Invoke.axisInvoke(Invoke.java:639)
at javaapplication17.Invoke.parseWSDL(Invoke.java:423)
at javaapplication17.Invoke.run(Invoke.java:76)
at javaapplication17.Invoke.main(Invoke.java:64)
at org.apache.axis.client.Call.invoke(Unknown Source)
Error invoking service : org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
at javaapplication17.Invoke.axisInvoke(Invoke.java:639)
at javaapplication17.Invoke.parseWSDL(Invoke.java:423)
at javaapplication17.Invoke.run(Invoke.java:76)
at javaapplication17.Invoke.main(Invoke.java:64)
Caused by: org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source)
at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
at org.apache.axis.message.MessageElement.publishToHandler(Unknown Source)
at org.apache.axis.message.RPCElement.deserialize(Unknown Source)
at org.apache.axis.message.RPCElement.getParams(Unknown Source)
... 7 more
Following is the code snippet and the passed values to the function:
Parameters passed to the test function:
targetNamespace = "http://V5_0.testcenter8"
serviceName = "testcenter8_V5_0WebServiceHttpSoap11Endpoint"
portName = "http://V5_0.testcenter8:testcenter8_V5_0WebService"
operationName = "executeRuleset"
arrListParameters; //obtained by parsing the XSD using XMLSchema(XSD created from wsdl types tag)
implURI = "http://192.168.56.89:8080/axis2/services/testcenter8_V5_0WebService?wsdl"
test function:
NOTE:some things have been hardcoded.
public void axisInvoke(String targetNamespace, String serviceName, String portName,
String operationName, ArrayList<Parameter> arrListParameters, String implURI)
try
// first, due to a funny Axis idiosyncracy we must strip portName of
// it's target namespace so we can pass it in as targetNamespace, localPart
int index = portName.indexOf(":", portName.indexOf("http://") + new String("http://").length());
String portNamespace = portName.substring(0, index);
portName = portName.substring(index == 0 ? index : index + 1); // to strip the :
javax.xml.rpc.namespace.QName serviceQN = new javax.xml.rpc.namespace.QName(portNamespace, portName);
org.apache.axis.client.Service service = new org.apache.axis.client.Service(new URL(implURI), serviceQN);
javax.xml.rpc.namespace.QName portQN = new javax.xml.rpc.namespace.QName(targetNamespace, serviceName);
// This Call object will be used the invocation
Call call = (Call) service.createCall();
// Now make the call...
System.out.println("Invoking service >> " + serviceName + " <<...");
//call.setOperation(portQN, operationName); //do not work
call.setOperationName(new javax.xml.rpc.namespace.QName("http://V5_0.testcenter8", "executeRuleset"));
call.removeAllParameters();// why there is parameters already added to the list of parameters
//call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
ArrayList<Object> arrListInputParameters = new ArrayList<Object>();
for(int i = 0; i < arrListParameters.size(); i++)
String strParamName = arrListParameters.get(i).strParamName;
String strParamType = arrListParameters.get(i).strParamType;
String strNameSpaceURI = arrListParameters.get(i).strParamNameSpaceURI;
if(strNameSpaceURI.compareToIgnoreCase("http://www.w3.org/2001/XMLSchema") == 0)
boolean isInParam = true;
if(strParamName.compareToIgnoreCase("cabinetName") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("testcenter8");
else if(strParamName.compareToIgnoreCase("loginReqd") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_BOOLEAN, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add(false);
else if(strParamName.compareToIgnoreCase("password") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("D@nger0us");
else if(strParamName.compareToIgnoreCase("userName") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("sanjeev");
else if(strParamName.compareToIgnoreCase("description") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("Change Address");
else if(strParamName.compareToIgnoreCase("subject") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("Credit Card");
else if(strParamName.compareToIgnoreCase("category") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("");
isInParam = false;
else if(strParamName.compareToIgnoreCase("massRequestType") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_INTEGER, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add((int) 1);
isInParam = false;
else
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("");
isInParam = false;
/*if(isInParam)
call.addParameter(strParamName, org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
//call.addParameter(strParamName, new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), ParameterMode.PARAM_MODE_INOUT);
else
call.addParameter(strParamName, new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), ParameterMode.PARAM_MODE_INOUT);
/*inputParams = new Object[arrListInputParameters.size() + 1];
inputParams[0] = "";
for(int i = 1; i <= arrListInputParameters.size(); i++)
inputParams[i] = arrListInputParameters.get(i - 1);
inputParams = new Object[arrListInputParameters.size()];
for(int i = 0; i < arrListInputParameters.size(); i++)
inputParams[i] = arrListInputParameters.get(i);
call.setReturnType(org.apache.axis.Constants.XSD_QNAME);
//call.setReturnType(org.apache.axis.Constants.XSD_ANYTYPE);
call.setTargetEndpointAddress(new URL("http://192.168.56.89:8080/axis2/services/testcenter8_V5_0WebService.testcenter8_V5_0WebServiceHttpSoap11Endpoint"));
Object ret = call.invoke(inputParams);
System.out.println("Result returned from call to " + serviceName + " -- " + ret);
System.out.println("Finished");
catch(java.net.MalformedURLException e)
System.out.println("Error invoking service : " + e);
e.printStackTrace();
catch(javax.xml.rpc.ServiceException e2)
System.out.println("Error invoking service : " + e2);
e2.printStackTrace();
catch(java.rmi.RemoteException e3)
System.out.println("Error invoking service : " + e3);
e3.printStackTrace();
WSDL file:
WSDL file:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://V4_0.testcenter8" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax258="http://testcenter8.V4_0.testcenter8/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax257="http://V4_0.testcenter8/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://V4_0.testcenter8">
<wsdl:types>
<xs:schema xmlns:ax260="http://V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8">
<xs:import namespace="http://V4_0.testcenter8/xsd" />
<xs:element name="executeRuleset">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="param0" nillable="true" type="ax257:testcenter8_V4_0_Req" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="executeRulesetResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ax257:testcenter8_V4_0_Resp" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:ax259="http://testcenter8.V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8/xsd">
<xs:import namespace="http://testcenter8.V4_0.testcenter8/xsd" />
<xs:complexType name="testcenter8_V4_0_Req">
<xs:sequence>
<xs:element minOccurs="0" name="cabinetName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="loginReqd" type="xs:boolean" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
<xs:element minOccurs="0" name="password" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="userName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="testcenter8_V4_0_Resp">
<xs:sequence>
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://testcenter8.V4_0.testcenter8/xsd">
<xs:complexType name="Inputs">
<xs:sequence>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="subject" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Outputs">
<xs:sequence>
<xs:element minOccurs="0" name="category" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="massRequestType" type="xs:int" />
<xs:element minOccurs="0" name="subCategory" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="executeRulesetRequest">
<wsdl:part name="parameters" element="ns:executeRuleset" />
</wsdl:message>
<wsdl:message name="executeRulesetResponse">
<wsdl:part name="parameters" element="ns:executeRulesetResponse" />
</wsdl:message>
<wsdl:portType name="testcenter8_V4_0WebServicePortType">
<wsdl:operation name="executeRuleset">
<wsdl:input message="ns:executeRulesetRequest" wsaw:Action="urn:executeRuleset" />
<wsdl:output message="ns:executeRulesetResponse" wsaw:Action="urn:executeRulesetResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap11Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap12Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap12:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceHttpBinding" type="ns:testcenter8_V4_0WebServicePortType">
<http:binding verb="POST" />
<wsdl:operation name="executeRuleset">
<http:operation location="testcenter8_V4_0WebService/executeRuleset" />
<wsdl:input>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="testcenter8_V4_0WebService">
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap11Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap11Binding">
<soap:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap11Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap12Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap12Binding">
<soap12:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap12Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpEndpoint" binding="ns:testcenter8_V4_0WebServiceHttpBinding">
<http:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpEndpoint/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Maybe you are looking for
-
Photos App Freezes and Shuts Down When I Try To Access Camera Roll
Hi, I am having trouble accessing my photos. Everytime I click onto photos it kicks me out, it does not even show the camera roll. I had my details transferred from my old phone to my iphone 4s, since this has happened, i cannot access my photos. I h
-
Nvidia Networking Controller Drivers in Vista BootCamp ????
I have installed Vista 32bit in BootCamp 3 on my new 13" Macbook Pro, all seemed fine but for some reason, Vista does not recognise the Nvidia Networking Controller driver installed from the bootcamp drivers, it says it failed to load the driver when
-
Hi all, what is the difference between ACH and EDI? Configure steps Please explain in detailed! I will assign the points. Thanks venu
-
How can i know the size of client
hi how can i know the size of client ? SAP ECC6 OS AIX 5.2 DB ORACLE10g regards Karan
-
Custom Styles in TextEdit - Background Highlighting
Hi, I defined a custom/'favorite' style for use in TextEdit which applies yellow background highlighting to selected text. (The style was added to the GlobalPreferences.plist file, as I'm on Snow Leopard). The issue is that when I highlight text and