Consuming a Web Service with WEB AS 6.40
Hello,
i try to consume a Webservice from the internet. I have configured the logical port and i created the client proxy as shown in the following real good weblog from
Thomas Jung.
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
But when i try to test the proxy in SE80 I retrieve the following error:
<CODECONTEXT>http://www.sap.com/xml_errorcodes</CODECONTEXT>
<CODE>SOAP:111</CODE>
<ERRORTEXT>Unallowed RFC-XML Tag (SOAP_EINVALDOC)</ERRORTEXT>
What's wrong here? Someone can help me?
Thanks for your help!
Klaus
We had the same error message for one of our Proxy Web Service calls.
We tried to use an RFC instead of the URL, and performed a TEST CONNECTION. And low and behold, we received an error message that was much more helpful than the "Unallowed RFC-XML Tag (SOAP_EINVALDOC)" message.
The problem for us was that the Server that we were trying to consume the Web service from was blocking the IP address of our Web Application Server.
We contacted the administrator, he verified that was the case, removed the restriction, and all is good now.
Here was the message we saw when we tested it in the RFC:
The Web server you are attempting to reach has a list of IP addresses that are not allowed to access the Web site, and the IP address of your browsing computer is on this list. Please try the following: Contact the Web site administrator if you believe you should be able to view this directory or page.
Hope this helps!
Similar Messages
-
Consuming Web Services with Web Dynpro Java
Hi All,
I've been searching around for a weblog that would describe building a web dynpro java app that consumes a web service. Ideally, I'm looking for something that has at least two views.
Does anyone know of good weblogs that address this?
Thanks!
Roman D.Have a look at the https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/5b77db42-0a01-0010-d7ba-8aa375593dd3">tutorial [original link is broken] [original link is broken].
Armin -
Help, Exception using Web Service with Web Dynpro
Hello All,
Can someone please help me with this exception:
com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(path=CalculatorComp/CalculatorCompView, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo): cannot modify Number1 because it is mapped and there is no active NodeElement to take the value.
I created a WebService based on Session Bean that exposes few functions.
One of them receives two int numbers and returns a sum them.
I've created A WebDynPro project with this structure:
In order to do that I've created a model based on this WebService and made the following mapping:
1. I've mapped the model context into the component global context - this mapping contains both the two numbers and the result.
My context in my Controller was like this:
Request_node * (Father Node)
Add * (Children Node)
Number1 -
Number2 -
Response* (Children Node)
AddResponse* (Children Node)
Return -
PS: "*" is Node and "-" is Attribute
2. I've mapped the context values the global context into the context of the view, like this.
Number1 -
Number2 -
Response*
AddResponse*
Return -
3. I add the following code in init() method:
Calculator model = new Calculator();
wdContext.nodeRequest_Add().bind(new Request_Add(model));
4. I also add the following code in method to execute the WS.
public void executeAdd( ) {
//@@begin executeAdd()
//$$begin Service Controller(-1063927033)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.currentRequest_AddElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
catch(Exception e)
manager.reportException(e.getMessage());
//$$end
//@@end
When I add values in fields and execute the method to call WS to happen the exception.
com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(path=CalculatorComp/CalculatorCompView, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo): cannot modify Number1 because it is mapped and there is no active NodeElement to take the value.
Do Anyone has any idea?
Thanks regards
Eduardo
Edited by: Eduardo Luiz De Angeli on Mar 3, 2009 6:16 AMHi Murali,
thanks for awnser, but I'd already seen the post and this don't helped me.
Hi Satish,
thanks for awnser!
I'd already fill the context nodes in init() method, but don't worked.
I tried to fill the context nodes of several ways, for example:
wdDoInit() Method
Calculator model = new Calculator();
Add add = new Add(model);
add.setNumber1(1);
add.setNumber2(2);
wdContext.nodeAdd().createAddElement(add);
Response_Add response = new Response_Add(model);
wdContext.nodeResponse().createResponseElement(response);
AddResponse addResponse = new AddResponse(model);
wdContext.nodeAddResponse().createAddResponseElement(addResponse);
wdContext.nodeRequest_Add().bind(new Request_Add(model));
Do you have any Idea?
Thanks
Eduardo -
Consuming Synchronous RESTful Web Service with PI
Dear experts,
i have a scenario for consuming RESTful web service.
i have followed all the steps showed in the following link for configuring my interface.
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/11/calling-synchronous-restful-web-service-with-pi--i
but still i am facing issues at the communication channel level, the trace of the communication channel is as follows
Error While Sending Message: Additional error text from response: com.sap.engine.interfaces.messaging.api.exception.MessagingException: org.apache.axis.ConfigurationException: adapter is null org.apache.axis.ConfigurationException: adapter is null at com.sap.aii.adapter.axis.modules.HandlerCore.process(HandlerCore.java:60) at com.sap.aii.adapter.axis.modules.HandlerBean.process(HandlerBean.java:86) at sun.reflect.GeneratedMethodAccessor602.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at com.sun.proxy.$Proxy3284.process(Unknown Source) at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:264) at sun.reflect.GeneratedMethodAccessor544.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at com.sun.proxy.$Proxy646.process(Unknown Source) at com.sap.aii.af.app.listener.AFWListenerBean.onMessage(AFWListenerBean.java:422) at sun.reflect.GeneratedMethodAccessor558.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at com.sun.proxy.$Proxy603.onMessage(Unknown Source) at com.sap.engine.messaging.impl.spi.ServicesImpl.deliver(ServicesImpl.java:362) at com.sap.aii.adapter.xi.ms.XIEventHandler.onDeliver(XIEventHandler.java:1091) at com.sap.engine.messaging.impl.core.queue.consumer.RequestConsumer.onMessage(RequestConsumer.java:75) at com.sap.engine.messaging.impl.core.queue.Queue.run(Queue.java:1017) at com.sap.engine.messaging.runtime.MSWorkWrapper.run(MSWorkWrapper.java:58) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
i have also attached screen shots of module tab of my SOAP(Axis) adapter
regards,
sushantHi Sushant
Check the question 11.I am getting org.apache.axis.ConfiguraitonException: adapter is null in this note 1039369 - FAQ XI Axis Adapter
(you will find all the answers in the attachment section)
Regards. -
Consuming web services with a java application
Hello,
I want to consume an ABAP generated web service with a stand-alone Java application. I am very new to this topic and need some hints how this functionality could be achieved.
How is the web service accessed by the Java application? What about security issues?
Thank you in advance for your replies! They will be appreciated.
Kindest regardsHi
See this Help and Examples
http://help.sap.com/saphelp_nw2004s/helpdata/en/e2/36a53dc1204c64e10000000a114084/frameset.htm
Kind Regards
Mukesh -
Biztalk 2010 - Consume Web Service with Certificate
Hi
I have to consume a java web service with Biztalk that requires authentication via a client certificate. Until now I have not been able to consume any web service where any kind of authentication was needed. Simple web services without authentication are
no problem. Also using SoapUI works perfectly fine.
I am generating the XSDs and the port binding with the WCF wizard in VS2010. I've read several comments that it's not possible to consume web services with the WCF-WSHttp adapter when the message format should be SOAP 1.1. Therefore I'm trying with the WCF-BasicHttp
and WCF-Custom adapters, but I did not suceed in receiving a positive response yet.
The web service I want to consume uses a client certificate (with a private key) and two root certificates. When I use the BasicHttp adapter I choose either 'Transport' or 'TransportWithMessageCredential' but none of them work. I also have to supply a client
and a service certificate. I always use the one with the private key for the client but I'm not sure which one I have to use for the service. Is there a possibility that I have to provide both root certificates and if so, how can I achieve this?
Hope the question makes sense somehow... thanks for any input.
Error message that I receive currently is that the server needs a client certificate. However I attached it in the send port properties under the tab "Security" => mode "TransportWithMessageCredential".Adapter: WCF-Custom
Binding: customBinding
Cannot send pictures (yet).
<configuration>
<enterpriseLibrary.ConfigurationSource selectedSource="ESB File Configuration Source" />
<system.serviceModel>
<client>
<endpoint address="...." behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="ReceiptBinding" contract="BizTalk" name="WebServicePort" />
</client>
<behaviors>
<endpointBehaviors>
<behavior name="EndpointBehavior">
<clientCredentials>
<clientCertificate findValue="..." x509FindType="FindByThumbprint" />
<serviceCertificate>
<defaultCertificate findValue="..." storeLocation="LocalMachine" storeName="AuthRoot" x509FindType="FindByThumbprint" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior" />
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<clear />
<binding name="ReceiptBinding">
<textMessageEncoding messageVersion="Soap11" />
<security authenticationMode="MutualCertificate" />
<httpsTransport proxyAuthenticationScheme="Basic" requireClientCertificate="true" />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
</configuration> -
Exporting to Microsoft Excel from a DataView Web Part consuming a Web Service with Parameters
In Sharepoint Designer, I've developed a page displaying a DataView Web Part which consumes an XML Web Service with three parameters. These parameters are passed in from a simple Form Web Part containing three input fields. I am able to provide default values for the web service so the dataview is initially populated, and when I enter in new parameters, the web service goes back, grabs the requested data and displays in the dataview nice and slick.
The problem I'm having is this: In Internet Explorer 7, when I right-click on the DataView Web Part and select Export to Microsoft Excel, Excel opens up, says "ExternalData_1: Getting Data..." and returns the data from the web service which applies to the default parameter values each and every time, regardless of whether I have changed the parameters on the web page, and contrary to what the DataView Web Part displays on the screen.
Has anyone else run into this, and is there a solution to the problem?
Best regards,
Mark ChristieHi Bullish35,
It's possible to provide single export button and export your 4 dataview webparts. Here's the modified code.
<Script Language="Javascript">
function isIE() // Function to Determine IE or Not
return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
function exportToExcel() // Function to Export the Table Data to Excel.
var isIEBrowser = isIE();
if(isIEBrowser== false)
alert('Please use Internet Explorer for Excel Export Functionality.');
return false;
else
var strTableID1 = "detailsTable1", strTableID2 = "detailsTable2", strTableID3 = "detailsTable3", strTableID4 = "detailsTable4";
var objExcel = new ActiveXObject("Excel.Application");
var objWorkBook = objExcel.Workbooks.Add;
var objWorkSheet = objWorkBook.Worksheets(1);
var detailsTable = document.getElementById(strTableID1);
var intRowIndexGlobal= 0;
for (var intRowIndex=0;intRowIndex<detailsTable1.rows.length;intRowIndex++)
for (var intColumnIndex=0;intColumnIndex<detailsTable1.rows(intRowIndex).cells.length;intColumnIndex++)
if(intColumnIndex != 3)
objWorkSheet.Cells(intRowIndexGlobal+1,intColumnIndex+1) = detailsTable1.rows(intRowIndex).cells(intColumnIndex).innerText;
intRowIndexGlobal++;
for (var intRowIndex=0;intRowIndex<detailsTable2.rows.length;intRowIndex++)
for (var intColumnIndex=0;intColumnIndex<detailsTable2.rows(intRowIndex).cells.length;intColumnIndex++)
if(intColumnIndex != 3)
objWorkSheet.Cells(intRowIndexGlobal+1,intColumnIndex+1) = detailsTable2.rows(intRowIndex).cells(intColumnIndex).innerText;
intRowIndexGlobal++;
for (var intRowIndex=0;intRowIndex<detailsTable3.rows.length;intRowIndex++)
for (var intColumnIndex=0;intColumnIndex<detailsTable3.rows(intRowIndex).cells.length;intColumnIndex++)
if(intColumnIndex != 3)
objWorkSheet.Cells(intRowIndexGlobal+1,intColumnIndex+1) = detailsTable3.rows(intRowIndex).cells(intColumnIndex).innerText;
intRowIndexGlobal++;
for (var intRowIndex=0;intRowIndex<detailsTable4.rows.length;intRowIndex++)
for (var intColumnIndex=0;intColumnIndex<detailsTable4.rows(intRowIndex).cells.length;intColumnIndex++)
if(intColumnIndex != 3)
objWorkSheet.Cells(intRowIndexGlobal+1,intColumnIndex+1) = detailsTable4.rows(intRowIndex).cells(intColumnIndex).innerText;
intRowIndexGlobal++;
objExcel.Visible = true;
objExcel.UserControl = true;
</Script>
I haven't tested this. But it should work! :)Regards,
Venkatesh R
/* My Code Runs in Visual Studio 2010 */
http://geekswithblogs.net/venkatx5/ -
Hi expert!!!
I have a problem!!
I need consume a web service with ssl autentification in PI to call from SAP.
That web services is of AFIP (Argentina ).
i don`t know how do that!!
How and where configure the certificate for signature??
Thxz in advance!!!
Sorry my bad english..thxz for all!!!!1
I will be to resume my problem
i need sign xml file with a certificate!!1
i have xml file build in ABAP, i try do with openssl in windows or unix to sign with private key file and certificate file .Crt
that generate a new file with sign, i put this in other web service and work....
i need do that in abap or pi..... i abap i could create xml file, but i can`t execute open ssl.....
thxz for u help!!! -
Consuming web services with Attachments
Hello,
I need to consume a web service with attachements (mime type) from sap was j2ee 7.0 (nw2004s).
When I try to generate the web service deployable proxy using nwds (version 7.0.06), I get the following error message
"Invalid WSDL or WSDL not found, please specify different WSDL.."
Removing references to"wsi:swaRef" from wsdl, above error is not displayd and wsdl is correctly processed
<complexType name="ArrayOf_tns2_swaRef">
- <sequence>
<element maxOccurs="unbounded" minOccurs="0" name="swaRef" nillable="true" type="wsi:swaRef" />
</sequence>
</complexType>
Unfortunately, we have not been able to find any SAP documentation (online help, oss note,,,) describing if SAP WAS Java 7.0 supports this standard.
Has anybody already worked with Web Services with attachments ?
Thanks in advace,
Regards
Bertahi berta,
http://help.sap.com/saphelp_nw04/helpdata/en/5e/ea656273b74cf386a1f29fc55721fd/frameset.htm
HTTP error 406 when consuming a Web Service with attachment
let me know u need any further info
bvr -
Consuming Domino web service with JAXB encounters Method Response element
I am able to consume a Domino R7 (Axis) web service with JAX-WS using Dispatch<SOAPMessage>. When I try using Dispatch<Object> however, JAXB throws an exception because it encounters an unexpected tag.
The XML from the web service looks like this:
<Envelope>
<Body>
<WebServiceMethodResponse>
<WebServiceMethodReturn>
The meaning of life
</WebServiceMethodReturn>
</WebServiceMethodResponse>
</Body>
</Envelope>With Dispatch<SOAPMessage>, I can get to the meaning of life quickly using SOAPBody.getElementsByTagName( "WebServiceMethodReturn" ) but with Dispatch<Object>, it appears I must also create a class for the WebServiceMethodResponse element to make JAXB happy. I don't see this happening in other people's examples. Has the Return-element-within-Response-element design been eliminated in pure JAX-WS web services, or is this something that only IBM does?In case anyone's search leads them here, I've posted the solution at:
*[http://www.pby.com/general.nsf/webarticles/dominowebservice01]*
It is an exhaustive article (not "Hello World"!) that goes through several versions of the web service and client - hopefully explaining all+ pieces of the puzzle:
~ web service code,
~ WSDLs
~ schema
~ thoroughly-documented clients that do and do not use JAXB
~ ... that use generated artifacts
~ ... that customize existing POJOs
~ the SOAP messages generated in each direction
~ the necessary JAXB annotations
~ explanations of how the code works
~ explanations of how namespaces affect the code
~ on and on and on...
My constant goal was to write an uncomplicated solution that uses as few artifacts (two) and annotations as possible. The end result is a small, fast JAX-WS 2.0 client that uses JAXB to invoke and consume a secured Domino 7 (1.4.2 JVM + AXIS) web service, using RPC/literal SOAP messages. -
Problem consuming web service with basic authentication
Hello,
I've set up a web service with basic authentication. Although I have to log in before being able to open the overview page of the web service in the Web Service Navigator, the response I get after sending a request is:
Authority check failed
I get this response in the Web Service Navigator as well as when consuming the web service via standalone proxy classes.
The following is strange, too: It is not possible to change authentication in the generated logical port. It is set to "none". I changed it via the XML file where I added the properties "AuthenticationMethod" (value "BasicAuth") and "AuthenticationMechanism" (value "HTTP"). But I got the above response anyway.
Thanks for your help!
RegardsI used basic authentication for my web service.
I was able to obtain a hardcopy of the logfiles in the meantime. The invocation of the web service is stored there with the following error messages:
<i>SOAP Runtime: Exception message: Schwerer Prozessierungsfehler macht eine SOAP-Fault-Behandlung erforderlich
SOAP Runtime: SOAP Fault exception occurred in program CL_SOAP_RUNTIME_SERVER========CP in include CL_SOAP_RU NTIME_SERVER... [the picture is cut here]</i>
In addition to that I found a thread in SDN that dealt with exactly the same problem:
Web Service Homepage: Authority check failed
But I have the same problem like Kimberly Carmack (the last post on the second page). We do not have that role in our system. -
Consuming and Providing Web Service with JD Edwards ERP system
Hi,
I would like to create web services with c++ or java OR any other easier way .
I need to use that web services to use in Share point to interact with JD Edwards ERP system .
Pls Note : Since not having license for JD Edwards, I need to create and call from Sharepoint Web service to JD edwards.
and not from JD edwards web service.
Could anybody guide me in this.
Thanks in advance.I had this error again so I thought I would post my solution:
The issue is SAP needs to know the certificates being used by the web site being called. These certificates are automatically installed in your browser but need to be manually installed in SAP. This is what I did:
How to find/install new certificates
Make sure you run Internet Explorer as an Administrator so you can export the certificates
Go to the web site that SAP is trying to call in Internet Explorer
Double click on the lock in the address bar
View certificates
Find the certificates that are being used
Tools --> Internet Options --> Content --> Certificates
Click on the “Trusted Root Certification Authorities” tab
Find the certificate identified in step iii
Export as a CER certificate
Click on the “Intermediate Certification Authorities” tab
Find the certificate identified in step iii
Export as a CER certificate
Go to STRUST in SAP
Import the Certificates in the “Anonymous” or “Standard” SSL client
Save
RESTART the ICM via t-code SMICM <-- Critical!!!
Test -
Issue with OSI PI WCF Web Service with wshttpbinding
Hi Experts,
System Details:
SAP MII 14 SP4
OSI PI Web Service: PITimeSeries
I am having issue when trying to call OSI PI web service using http post. it is returning status 0 when i am using exception handler in BLS.
Same web service works fine with basichttpbinding (SOAP 1.1) but with wshttpbinding (SOAP 1.2) it is giving error.
Following are Web config binding details for web service.
<wsHttpBinding>
<binding name="wsBinding_2011" sendTimeout="00:01:00" receiveTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
I am not sure it could be the issue with passing windows credentials.
Did anybody consumed WCF web service with wshttpbinding with security mode as Message and clientCredentialType as Windows.
Also i was trying to pass MYSAPSSO2 SSO token to service in http post but first i am not sure if this is correct windows token and second which header property of service should be mapped and i am not sure that I am going into correct direction or not.
Please let me know what i am missing.
I have tried following other options and tools:
SOAP UI: basichttpbinding works fine for wshttpbinding receiving Internal Server error in log and Response as
The security context token is expired or is not valid.
MII Web Service Action Block: basichttpbinding works fine for wshttpbinding not able to configure url through wizard because as per my discussion with other MII experts MII does not support SOAP1.2. that is one reason for using http post.
WCF Storm: both bindings works fine (There is option to select windows authentication and Impersonation level as delegation)
WCF Test Client: Both bindings works fine
Any help is appreciated.
Thanks & Regards,
Manoj BilthareHi Sam,
The web service is valid following are details of testing on various tools.
SOAP UI: basichttpbinding works fine for wshttpbinding receiving Internal Server error in log and Response as The security context token is expired or is not valid.
MII Web Service Action Block: basichttpbinding works fine for wshttpbinding not able to configure url through wizard because as per my discussion with other MII experts MII does not support SOAP1.2. that is one reason for using http post.
WCF Storm: both bindings works fine (There is option to select windows authentication and Impersonation level as delegation)
WCF Test Client: Both bindings works fine
Please let me know if additional details required.
Thanks & Regards,
Manoj Bilthare -
Consuming External Web Services in Web Dynpro Java
Hi All,
I an trying to consume external web service in Web dynpro java using Adaptive Web Service Model.
But getting below mentioned error while executing the web service
Exception on execution of web service with WSDL URL 'D:\Web Service Project\CurrencyConvertor.asmx.xml' with operation 'ConversionRate' in interface 'CurrencyConvertorSoap'
Steps i followed are as below:
1. Created Adaptive Web Service Model for this i select WSDL source as "Local File System or URL"
In next step i select No logical destination radio button and click on next
In next step, browse the WSDL file and successfully import the WSDL file.
2. After successfully importing the WSDL file i wrote below code in Init method:
WebModel modelweb = new WebModel();
Request_ConversionRate reqConversion = new Request_ConversionRate(modelweb);
ConversionRate conversion= new ConversionRate(modelweb);
reqConversion.setConversionRate(conversion);
wdContext.nodeRequest_ConversionRate().bind(reqConversion);
3.After that execute the model - code is given below :
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.currentRequest_ConversionRateElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeConversionRateResponse().invalidate();
catch(Exception e)
manager.reportException(e.getMessage(), false);
Please let me know how to resolve this.
Thanks
SandyHi,
You need to use destinations for metadata and modeldata.
Configure those destination in Visula admin.
you can refer to following link.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
Regards,
Shruti. -
Calling Reporting Services Web Service with jQuery possible?
Hi,
is it possible to call the Reporting Services Web Service with jQuery? If yes, can someone post me a small example?
Background:
My plan is to create a html with a form which is also uploaded then into the reportserver. I open this html later by clicking a link in a report (with gotoURL open.window). The report opens the html inclusive the overtaken of some additional parameters
(reportname, reportdescription). These parameters I will use in the html-form as defaultvalues for the corresponding input-text-fields. Now the user can make some changes (i.e. the decription). With a click on a button I will send the new description to
the Reporting Services Web Service by using the SetProperties method, closing the html-window and reload the report. Important is that I want to upload the html also into the reportserver itself.
I have already found how to consume a web service via jQuery but with the Reporting Services Web Service I did not get it running in my tests.
I have referenced to the following jQuery.js: http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
Here you can see my tests I made with the results:
$.ajax({
type: 'POST',
url: 'http://<..>/ReportServer/ReportService2010.asmx/ListChildren',
data: {'ItemPath':'/','Recursive':false},
complete: function(xData, status) {
$('p').html($(xData.responseXML).text()); // result
$("#divStatus").text( status ); // status }
I got a NULL response with Status success. But where are the items?
Another test which should response only one value was that:
$.ajax({
type: "POST",
contentType: "text/xml; charset=utf-8",
url: "http://<..>/ReportServer/ReportService2010.asmx/GetItemType",
data: {"Item":"/Development"}, // Development is a Folder in my Reportserver-Root
dataType: "xml",
success: function (msg) {
$("#divResult").html(msg.responseXML);
error: function (data, status, error) {
$("#divResult").html("WebSerivce unreachable<br> <br>" + data.responseXML + "<br> <br>(" + error + ")");
Here I got an [object Error]
And here my last test:
var soapMessage = '<?xml version="1.0" encoding="utf-8"?>\
<soap:Envelope \
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" \
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema">\
<soap:Body>\
<GetItemType xmlns="http://www.microsoft.com/sql/ReportingServer">\
<ItemPath>/Development</ItemPath>\
</GetItemType>\
</soap:Body>\
</soap:Envelope>';
$.ajax({
type: "POST",
contentType: "text/xml; charset=utf-8",
url: http://<..>/ReportServer/ReportService2010.asmx?wsdl,
data: soapMessage,
dataType: "xml",
success: processSuccess,
error: processError
function processSuccess(data, status, req) {
if (status == "success")
$("#response").text($(req.responseXML).find("Type").text());
function processError(data, status, req) {
alert(req.responseText + " " + status);
Here I got an "Undefined error"
Can anyone help me?
Thanks
René IllnerHi Rene,
I have one vbscript class to call web services. May be if you need you can use it.
dim ws
set ws = new webservice
ws.url = "http://servername/ReportServer/ReportService2010.asmx"
ws.method = "MethodName"
ws.parameters.Add "Parameter1", "Param1 Desc.."
ws.parameters.Add "Parameter2","[email protected].."
ws.execute
set ws = nothing
'------web service calling class
class WebService
public Url
public Method
public Response
public Parameters
public function execute()
dim xmlhttp
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST", Url & "/" & Method, false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send Parameters.toString
response = xmlhttp.responseText
set xmlhttp = nothing
end function
Private Sub Class_Initialize()
Set Parameters = new wsParameters
End Sub
Private Sub Class_Terminate()
Set Parameters = Nothing
End Sub
End class
class wsParameters
public mCol
public function toString()
dim nItem
dim buffer
buffer = ""
for nItem = 1 to Count
buffer = buffer & Item(nItem).toString & "&"
next
if right(buffer,1)="&" then
buffer = left(buffer,len(buffer)-1)
end if
toString = buffer
end function
public sub Clear
set mcol = nothing
Set mCol = CreateObject("Scripting.Dictionary")
end sub
public sub Add(pKey,pValue)
dim newParameter
set newParameter = new wsParameter
newParameter.Key = pKey
newParameter.Value = pValue
mCol.Add mCol.count+1, newParameter
set newParameter = nothing
end sub
public function Item(nKey)
set Item=mCol.Item(nKey)
end function
public function ExistsXKey(pKey)
dim nItem
for nItem = 1 to mcol.count
if mCol.Item(nItem).key = pKey then
ExistsXKeyword = true
exit for
end if
next
end function
public sub Remove(nKey)
mCol.Remove(nKey)
end sub
public function Count()
Count=mCol.count
end function
Private Sub Class_Initialize()
Set mCol = CreateObject("Scripting.Dictionary")
End Sub
Private Sub Class_Terminate()
Set mCol = Nothing
End Sub
end class
class wsParameter
public Key
public Value
public function toString()
toString = Key & "=" & Value
end function
end class
Regards, RSingh
Maybe you are looking for
-
Why is audio out-of-synch with video on VOB files
I used a Pioneer DVR to import ~120 8mm and Hi8mm and Digital8 analog tapes to convert them to DVD's. These ~120 DVD's are in VOB format. These are 4:3 video (not HD). I did test this flow and didn't notice a few of the VOB's did not have the audi
-
Always "Delivering your iTunes Match Result"
I have around 23.5K songs in my iTunes library, and everything works fine for me before. Now, I am going to rip some new CDs to iTunes, the new songs won't upload to iTunes Match. After I manually clicked "Update iTunes Match". It keeps looping with
-
Hopefully this is a simple question. How do you change the addressee for the default OEM alerts and messages. I specified an e-mail address upon installation. Now I want to change the adressee. John
-
Is there an easier way to transfer album artwork to all songs on album?
ok. i found the album artwork, now how do i transfer it other than one song at a time?? this is really frustrating. someone please help me! iPod video Windows XP
-
Hi Gurus, someone can explain me how disable the cookie SAPWP_active ? This cookie is generated when Portal call ITS or WAS application and in particular I think that in my system it generates a javascript error "Access denied". In fact if I run the