Consuming 3rd party web service in Java web dynpro application
Hi All,
I am working on a scenario where external(3rd party) web service has to be consumed in WD Java application. I am provided with WSDL file. Let me explain how I usually consume other webservices:
Create model->AWS model->Remote Location/file System->provide url->create/choose service group->finish
Then I would generate the code in custom controller by applying template
I assign provider system as local for the service group in nwa.
This is normal process to me. I am struck with this 3rd party web service. Please share your ideas on the same. Any help is highly appreciated.
BR,
Manoj
I ve created a provider system pointing to where 3rd party WS resides. i am trying to connect through WSIL. While pinging that provider system, I don't see that particular WS(that I am gonna consume). And while assigning this Provider system to service group, processing state getting 'Failed'.
What could be reason?
Similar Messages
-
How to consume the Abap web service in Java web-dynpro
Hi Everyone,
I want to consume ABAP web service in java web dynpro.
so when i tried to create model in java web-dynpro, it gave me an error message saying "Invalid WSDL or WSDL not found".
i think this error message is because, to access the WSDL of abap web-service, we need username and password, but the dialog box in java web-dynpro is not programmed to take username and password from us and send it to the server to get the WSDL.
i came to this conclusion because i was able to successfully test my abap web-service in java portal. the java portal asked me the username and password to open the WSDL.
So, please help me to consume the abap web service in java web-dynpro.
Thanks in advance
Regards
VikasHi Vikas ,
while creating a model in web-dynpro try to use the "import web service model" option and if you are using local server choose the local server option so that you can get the available web services which are in server, select one among them and continue you process.I think this is the some what easy way .
If you want use the URL for wsdl better to once test the available service in server and copy that WSDL URL and paste over WSDL textbox.
I think this is pretty help ful to you
Best Regards
Srikatnh -
Problem in calling XI generated Web Service via Java Web Dynpro
Hi experts,
I have problems with calling a web service, which was created by XI. I have already tested the web service with Altova XMLSpy. The Web Service works fine.
But when embedding this web service into Java Web dynpro application no message flow is given. I have two views one Selection View and one Result View which should show the answer sent by RFC-Call.
<b>My Settings in NWDS:</b>
During configuration of web dynpro I have choosen 'Import adaptive Web Service Model' --> Select wsdl file via local file system --> 'no logical destinations - use WSDL URL for metadata retrieval and web service execution'.
The model is also not shown in diagram view although I have added into the diagram.
The web service was created on XI 7.0.
Should I do any other settings e.g. in Visual Administrator, Web Dynpro Content Administrator?
So can anybody help me.
Thanks a lot.
Regards,
MarioHi Aviad,
thanks for your fast reply.
But in Web Service Navigator my Web Service is not shown, because I used the SOAP Adapter.
<b>My Web Service link:</b>
http://<host>:<port>/XISOAPAdapter/MessageServlet?channel=:SRV_GBD_WS_GET_DEB_DETAIL:CC_GBD_WEBSERVICE_SENDER&version=3.0&Sender.Service=&Interface=%5E*
During executing Web Dynpro I got following errors:
1. 'The system cannot find the path specified'.
2. com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL
Regards,
Mario -
JDeveloper 10g 10.1.3 Web Service Question: java web service calls another
I am looking for what I think should be a simple example/tutorial but so far no luck. I am using JDeveloper 10g 10.1.3 and the Oracle Application Server.
I want to do this:
- create a simple Java web service
- deploy it
- create another simple Java web service, that makes a call to a method on the first service
- deploy it
client->WSfront->WSback
I want to keep this as basic as possible.
Although I have found examples of how to create a web service proxy, there are no examples that I have found that show how to use that proxy in another web service:
I did what I thought were the right things; generated a proxy for the first web service, and used that proxy in the second web service's source Java class. However when I deployed and tested many classes were missing: all the classes the proxy class depends on.
I actually managed to get something like this working but had to manually create the .ear and .war files for WSfront, explode the archives, and manually add the missing classes to its WEB-INF/classes.
I am comparing this to things like Weblogic Workshop in which doing this exercise is a snap.
Is there a simple graphical way to do this in JDeveloper?Hello again,
I am quite surprised I got no responses to my query below.
Can anyone explain how I might do this?
Please feel free to respond to [email protected]
I am looking for what I think should be a simple
example/tutorial but so far no luck. I am using
JDeveloper 10g 10.1.3 and the Oracle Application
Server.
want to do this:
create a simple Java web service
deploy it
create another simple Java web service, that makes a
call to a method on the first service
deploy it
client->WSfront->WSback
want to keep this as basic as possible.
lthough I have found examples of how to create a web
service proxy, there are no examples that I have
found that show how to use that proxy in another web
service:
I did what I thought were the right things; generated
a proxy for the first web service, and used that
proxy in the second web service's source Java class.
However when I deployed and tested many classes were
missing: all the classes the proxy class depends
on.
I actually managed to get something like this working
but had to manually create the .ear and .war files
for WSfront, explode the archives, and manually add
the missing classes to its WEB-INF/classes. -
401 Error on Consuming SharePoint Versions Web Service by java client running on Unix Machine
In my organiszation I have sharepoint site of our project. I have a java client to consume Versions Web Service offered by SharePoint. The response received from web service without any issue when triggered from a client running on windows machine on
intranet.
When same java client ran from UNIX server on same intranet, it gives 401 error. Is there some different approach required for authentication while connecting from unix machine?
Thanks in advance.Hello,
Are you passing credential in code? If not then try to add using networkcredential.
If you are passing then make sure that current user is having access on SP site and your javaserver is setup for NTLM security. Here is few links for same issue which could help you troubleshoot the issue
http://stackoverflow.com/questions/8884152/ntlm-fails-when-consuming-sharepoint-web-service-from-java
http://www.pentalogic.net/sharepoint-products/reminder/reminder-manual?p=troubleshooting%2F401errors%2F401errors.htm
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help -
Web Service in java HELP!!!!
Hi everyone,
i'm new in web services and i have to make a web service in java that it will accept an xml file from a client. The client will have to connect with the server in a particular port and ,through the web service, the client will have to send the xml file. Firts of all, i would like to ask if it 's something difficult to be done. Secondly i would appreciate if someone gave me a guideline about how to start the implementation of the web service.
Thanks in advance. :)Kayaman wrote:
993033 wrote:
Thanks for the reply !I have read a lot of things about web service. i m reading about a week now for web services :)Well, you probably won't be able to do it with just a week of reading.Maybe a "hello world" type of webservice producer + consumer, if you know Java and web environments properly. JAX-RS is a bit easier in my opinion though, its a very well-defined API and I had a setup between Java and Ruby on Rails running in an afternoon. If you take the time to read and understand the material first of course. Especially the understanding part is what people tend to want to skip over.
We can't just "give a hint" and you'll be magically able to write a webservice. Programming doesn't really work that way.Indeed, and software engineering works even less like that. It happens to be bloody hard. -
Hi,
How would I consume web service using Java SE ?
Is there any lib i can use ?
import.java.net or something ....
Any input will be good.Creating a web service client means first setting up your environment and making a few decisions about which of the available invocation methods is best for your application.
Have a look at the following links for some pointers:
http://www-128.ibm.com/developerworks/webservices/library/ws-javaclient/
http://java.sun.com/blueprints/guidelines/designing_webservices/
Investing in a decent web services book, like the following, is also a good idea:
Monson-Haefel, R. (2004). J2EE Web Services. Boston: Addison-Wesley. -
How to invoke Web Service in JAVA from CRM 5.0
Hi.
I created a Web Service in JAVA. Now I want to invoke it from CRM 5.0
in ABAP. How to do it? Could someone give me detail step in step?
Thanks in advance!check this weblog by Thomas Jung
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
Raja -
Consume a Web Service from a Web Page
I had tried out the Tutorial "Consume a Web Service from a Web Page". I have encountered this error :
; nested exception is: java.lang.NullPointerException.
oracle.adf.model.adapter.AdapterException: DCA-40010: The Web Service call failed. The service returned a SOAP fault with the message: [S:Receiver] EJB Exception: : java.lang.NullPointerException
at oracle.model.freightjb.CalculateFreightBean.calculateFreightCost(CalculateFreightBean.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy170.calculateFreightCost(Unknown Source)
at oracle.model.freightjb.CalculateFreight_5vfuh6_WSOImpl.__WL_calculateFreightCost_WS(CalculateFreight_5vfuh6_WSOImpl.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
I tried to modify abit the code as i changed the web method parameter from object (BatchOrder order) to variables(eg. int) and it works. When I test the Web Services I need to select the include checkbox den it works nicely else i will also encounter this problem. Does this mean the web services can not take it object as parameter?Hi Paolo,
maybe I faced the same issue. I solved it reading the thread:
web service deployable client
Hope this help
Cheers
Roberto -
How to access .asmx Web Service using JAVA? Newbie
Hello Experts,
Currently, I have a project where in I have to access a ,NET web service. It is made of C#. I just want to ask how will I start the accessing process? I made this simple equation on how my project is.
Java Project + C#.Net Web Service = Integration
1. Do i need to create a Web Service too for the Java Project? If yes, What are the necessary tools needed for the creation of this Java Web Service?
2. The .NET Web Service is available online. (It is made by other people).
3. Based on the equation, what is the equivalent technology for the + sign?
4. Can you site a concrete example for accessing a web service?
5. I'm new here. Totally I have no idea where to start.
6. Thank you experts.
Edited by: Benedict.Aluan on 05 30, 08 1:38 PM
Edited by: Benedict.Aluan on 05 30, 08 1:39 PMHello
Thanks a lot for your help ...
I am developing simple J2EE based web service client using IBM WSAD 5.1. I have used the following code to call .asmx web service in Java
String url = "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl";
String namespace = "http://tempuri.org/";
name = request.getParameter("txtName");
try
System.out.println("In Internet Service");
ServiceFactory factory = ServiceFactory.newInstance();
Service serv = factory.createService(new URL(url),new QName(namespace,"TempConvert"));
System.out.println("Got Service......");
Call obj = (Call)serv.createCall();
System.out.println("Got Call......");
obj.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
obj.setProperty(Call.OPERATION_STYLE_PROPERTY,"wrapped");
obj.setTargetEndpointAddress(url);
obj.setPortTypeName(new QName(namespace,"TempConvertSoap"));
obj.setOperationName(new QName(namespace,"FahrenheitToCelsius"));
obj.addParameter("param1",XMLType.XSD_STRING,String.class,ParameterMode.IN);
obj.setReturnType(XMLType.XSD_STRING);
System.out.println("Parameters Set.....");
Object[] params = new Object[]{name};
k = (String)obj.invoke(params);
System.out.println("Result: "+k);
catch(Exception e)
System.out.println("Exception is : "+e);
}But this code is throwing exception that
Invalid Address "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"I have also tried this URL with Java Proxy. But it showing the same error.
Plz can u tell me how to access .asmx web service ?
Waiting 4 reply. -
Parse errors while creating a Web service from Java class!
Can anybody tell me please, is it possible to create a Web Service from java class where the input from user is required ?
I have the following program, which is successfully compiled, but when I'm trying to make a web service in JDeveloper, the following error occurs:
"Validation failed.
The implementation class primePackage.isPrime ofport type MyWebService contains parse errors."
import java.io.*;
import java.util.*;
class isPrime
public static void main (String args[])
Scanner reader = new Scanner(System.in);
int n;
System.out.println ("Enter a number you want to know is it prime or not");
n=reader.nextInt();
if (isPrime(n))
System.out.println ("True");
else
System.out.println ("False");
static boolean isPrime (int n)
int i=2;
while (i<=n-1)
if (n%i==0)
return false;
i++;
return true;
}Hi,
Can anybody tell me please, is it possible to create
a Web Service from java class where the input from
user is required ?Yes, the parameters of your method will be mapped in WSDL.
But i've some considerations about your code.
I suggest you change the name of isPrime do Prime, its a good code convention to put the name of class starting with Upper case. and isn't good the name of class equals to name of method.
I suggest you to change the "static boolean isPrime (int n)" to "public boolean isPrime(int n)" to publish a method as a WebService method it's must be public and not static. After this change try to generate your Web Service.
Regards. -
Calling a Web Service from Java
Our java guru (who is out sick....AHHHH) created all the calls that are needed to access the web service that he has running. For example the call getLongList(String user, String password) will return a list of all outstanding transactions. He made a jar file that has service has class files for PortType, Service, Service Locator and Soap Binding stub.
How do I call this web service from java? Do I have to import it into my classpath? or just call these parameters from within my java code?never mind...i got it
-
Calling a Web Service from Java Webdynpro
Hi,
Can any one give me step by setp details on how to call a Web Service from Java Webdynpro ?
I tried creating a model using Import Web Service Model but when I completed creating the model, I got some errors as shown below.
Error The method setRouteGeometryLineArray(double[][]) in the type Trip is not applicable for the arguments (double[]) ComplexType_Trip.java WS_INVOKE/gen_wdp/packages/com/cintas/test/model/p1 line 249
thanks
SBKHi SBK,
I assume you may already have read the [help guide|http://help.sap.com/saphelp_nw70/helpdata/EN/81/12703e5da3e946e10000000a114084/content.htm] This gives a pretty good idea of how to do it (step by step).
Is there a typo in the error you pasted?
Error The method setRouteGeometryLineArray(double][) in the type Trip is not applicable for the arguments (double[]) ComplexType_Trip.java WS_INVOKE/gen_wdp/packages/com/cintas/test/model/p1 line 249
The square brackets [] after double in the method call appear to be reversed. Is that also in the code? or just a mistake here?
Hope this points you in the right direction.
BRgds,
Simon -
Web Service From Java class, serialization problem
Hi,
I want to create Web Service from Java class, I made java project, generated web service from it, create web service archive project and deployed it to WAS 6.40.
My class have 2 methods,
public int add(int a, int b);
public MyResponse doSomthing(MyRequest req);
I can succesfully call add method from Web Service Navigator, it works fine but when I call doSomthing methods I get the following error:
<b>
Deserializing fails. Nested message: XML Deserialization Error. Result class [com.mycomp.sap_tech.ws.MyRequest] does not have property [Amount] of type [java.lang.String]. It is required to load XML..
</b>
Any ideas how to resolve it?
P.S. MyRequest class is exposed throw VI, has default constractor and public getters and setters for all properties. It implements Serializable as well. Any guesses?
Thanks in advance,
Victor.Hi Bhavik, thanks for response.
as I already mentioned it implements Serializable, so it is not the problem.
Thanks Avi but it didn't helps iether
Victor -
How to create web services in java?
Hi,
I am a newbie to java webservices. Can anybody tell me how to create web services in java?
Any tutorial link or step by step doc would be useful.
Appreciate your help in this regard.
Thanks in advance.
naymo01.Creating web services in Java appears to depend highly upon the server you intend to use.
Here's a tutorial: http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html
Maybe you are looking for
-
How to delete line item from sales order ?
Dear All , user is having 20 line items from which 3 line items of which prod order confirmation cancellation is done also goods reversal done now as user tries to delete the line items an info box pops up --> Due to cost m
-
Help-Safari wont load any pages-others having same problem
Safari wont load any pages. Tried reinstalling Safari. Nothing. Zip. Notice that people on the Safari for Windows board are having the same problem. WHAT IS GOING ON? Anyone know? I get the menu bar, but not Bookmarks, etc. Cannot see a blank page. C
-
Clearing receivable items by batch input
HI all, in account receivable scenario my question concerns automatically clearing items (program RFEBBU00 create a batch input session) by using reference field instead of document number. I am not able to do it by customizing. Can you help me? Rega
-
To equall the size of all the columns
Hi, i want to equall the size of all the columns. How can it be done??
-
Hi, please help me why i can not use my 'Infineon 64 mb MMC Card' on my pccam 850? i have never use mmc card before, and this is the first time, but everytime i insert my mmc card then turn the camera on, i get only hear camera startup and the light