Help with call to web service
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,
-- Johnnie
Hey 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
Similar Messages
-
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 -
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? -
Issue with calling external web service with authentication details ...
Hi,
I am facing a deployment issue with Oracle ESB. I am trying to call an external Web Service with authentication from ESB SOAP Service. It is working fine with my local ESB version 10.1.3.3.0 Build PCBPEL_10.1.3.3.0_GENERIC_070615.0525; however it is getting an error at our development ESB version 10.1.3.3.1 Build PCBPEL_10.1.3.3.1_GENERIC_RELEASE.
I am getting following error.
An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception during SOAP invoke: Server was unable to process request. ---> Object reference not set to an instance of an object.; nested exception is: javax.xml.rpc.soap.SOAPFaultException: Server was unable to process request. ---> Object reference not set to an instance of an object. at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.populateFaultMessage(WSIFOperation_JaxRpc.java:3086) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeOperation(WSIFOperation_JaxRpc.java:1728) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1473) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.executeRequestResponseOperation(WSIFOperation_JaxRpc.java:1196) at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:867) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:770) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:790) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:208) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:127) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:118) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:95) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1424) at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:112) at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:307) at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispat
Could one of you please help me out to understand why it is happining.
Thanks in advance.
Jyotirmoy.Hi 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 -
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. -
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 -
Help: consuming an external web service with user name token
Hello Together!
I need to consume an external web service secured with WS-UserNameToken. The way, how did I do it:
1. I generated a web service consumer (proxy) in SE80 from the wsdl file
2. I created logical port for the consumer in SOAMANAGER
3. I created security profile in WSSPROFILE with telpmate SET_USERNAME and assigned it to consumer operation in LPCONFIG (I use LPCONFIG, because I didn't find any way to do it in SOAMANAGER)
3. I called the web service and got the error back: session token is missing or invalid or has inspired
My questions are:
1. is this possible to consume an external webservice in SAP, which is secured with WS-Usernametoken?
2. do I need therefore any settings in java stack? do I need java stack in general?
3. Is this any way to configure the consumer without writing programs, which set header parameter manually?
4. if the answer on the third question is no, do you have any examples, how to implement session management in report? (I mean sending session id and checking the validaty of id)
I appriciate any help of you!
best regards AnnaHi,
it should be possible to use WS-UserNameToken for consuming web service. It should be available on AS BAP 7.0 and higher. This profile should be under category Document authentication. You can try to dump a message send from SAP to see what is going out of SAP. This should be supported in ABAP so you don't need a Java stack. What exactly do you want to configure? Do you want to just set user name and password for that service which will be used for any calls of that proxy?
Cheers -
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!!! Problem of Calling external Web Service from a Java Stored Procedur
1.I read the topic on http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html about Calling external Web Service from a Java Stored Procedur.
2.After I import .jar to Oracle what is required by the topic,som error occued.
Like: ORA-29521: javax/activation/ActivationDataFlavor class not found,
ORA-29545: badly formed class.
3.These is not enough .jar required on the topic? What can I do for ORA-29545: badly formed class?
Thany you!Try this
Re: HELP! Loading Java Classes into Oracle ERROR
Maybe you are looking for
-
Voice dial does not confirm nor allow cancel
When I use voice dial (usually via bluetooth headset on iPhone 3GS), if the iPhone decides it has found an exact match, it will notify me of the match and then start dialing. It does not confirm the match with me, and when it starts dialing, the "Ca
-
Straight talk MMS will not work on iPhone 5 purchased from Apple
Just purchased an iPhone 5 from Apple and activated on Straight Talk. Used the BYOD ( bring your own device ) option and purchased a SIM from ST. Everything works fine except my MMS. I even went and purchased a nano SIM from Tmobile. I have tried eve
-
The ipod cannot be updated. An unknown error occurred (-4)
I was prompted to install the new version of iTunes. Then I installed the update software ... and now I'm getting the error message in the subject line. I've tried, reinstalling, rebooting, resetting ... nothing seems to work. What now???
-
Tried to get the email sent to reset password, but never ever recieve it no matter how many times i try. I then also try to do it the other why with the security questions but then says ive entered my D.O.B incorrectly. HELP!
-
Hi, I have been working on an email application and i am having a problem with the speed of getting information from my sql database. When someone logs into there account all messages related to them from the database are loaded and then each message