• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I pass the soap web-services XML file to one of my Servlet and jsp  RSS feed

 
revathi kurum
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi can anyone help! the problem is Am using carrer-builder API to access data now how i can parse soap web-services through servlet thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

I think we need to have a lot more detail about what you're trying to do before we can help you in a meaningful way. For starters, I suspect that "carrer-builder API" is a typo, but any way to correct that comes to me still means nothing - career-builder API? carrier-builder API? Something else?

Apart from that, what is the precise problem? You have a servlet that tries to access this 3rd party WS API? What does XML have to do with it? Usually, the SOAP toolkits generate client code that hides all the SOAP and XML stuff underneath Java methods. Could you use that? Or are there particular reasons you need to work with XML directly? If so, what are they? etc. So, please TellThe Details.
 
revathi kurum
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually my problem is i don't know web-services i did one sample factorial web-services. i will paste my code here

Web-service:



And web-service client:

index.jsp:



This is servlet program and here i implemented my business logic

TestFactorial.java:



This what i implemented in web-services.

now how i will interact this web services with client side(phone gap), how i will interact. i done client side but i will not get any result. here my client side code is



can
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like you're trying to mix a servlet with a WS in the same class...? That's an odd design, I would suggest to keep those separate, and have them both use a class that implements the common business logic in this case, the factorial method). And I would strongly advise to use a REST WS instead of SOAP for anything that's accessed from inside a browser via JavaScript.
 
revathi kurum
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what only i don't know about web-services please you have any like this example is there, can you suggest me and one more compared to soap rest only better but i want soap based example. thanks for understanding
 
revathi kurum
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean based on factorial example web-services working through phonegap android emulator. please help me i am trying to struggle 2 weeks onwards i referred so many examples but server side i didn't get answers.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I bet that you're having problems getting SOAP to run if you're constructing the XML by hand, and doing it inside a browser via JavaScript is even trickier.

Fact is, almost nobody uses a SOAP API in web pages, and even from within a native mobile app the majority of WS calls are made to REST WS.

I suggest to forget about the mobile aspect for a while, and familiarize yourself with REST WS. There's no shortage of JAX-RS examples and tutorials out there, probably even some that implement factorials :-)
 
revathi kurum
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
k please can you ping rest web services examples, thanks for understanding
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should hone your web search skills; relying on folks on a forum to do a Google search for you is not going to work well. That phrase you used -rest web services examples- would be a good start.
 
revathi kurum
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
k thanks a lot
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!