Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

NarendraBabu Bandaru

Greenhorn
+ Follow
since May 17, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by NarendraBabu Bandaru

Could you please share the WSDL Generated.

thanks,
naren
13 years ago
Can you please post the Binding part of the wsdl. Especially SOAP Body.

Thanks,
Naren
13 years ago
Hi,

We have created some webservices with WSDL2Java method. Now we need to add the user name and password in SOAP Headers for the security purpose.

We are using CXF for the webservices. As am new to this enabling security, need help the procedure to proceed. (adding soap headers in wsdl or request xsd and any other java files need to be added)

Help in this regard is great and get back to me in case of any other information you need.

Thanks,
Naren
13 years ago
I suggest the best way is going - WSDL2JAVA ..

First create the requirements into a XML Schema. With which you can easily create the WSDL and then with the help of wsdl2java tool, generate the required java files.

When you want to convert the existing functionality to a webservice, at that moment going JAVA2WSDL is good.

But if you are going for creating a new webservice, it is always good to go with WSDL First.
13 years ago
You can use the below mentioned sample code to access the http header data.

import org.apache.axis.MessageContext;
import org.apache.axis.transport.http.HTTPConstants;

MessageContext context = MessageContext.getCurrentContext();
HttpServletRequest req = (HttpServletRequest) context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

Thanks,
narendra
13 years ago
I suggest to go through the concepts of JAXB, which will really help in sending request in XML format and getting response back in XML. For this you need to have the XSD available.
If XSD is not avialable , JAXP concepts will help you
13 years ago
can you provide the wsdl for the same?
13 years ago
This is -- creating xml response instead of a string. If you are creating the WSDL, then you would be having an XSD for the request or response.

Use JAXB to create the java objects from the XSD's. With that easily you can map your response to java object and you can send directly as an XML itself.
13 years ago
If you are correctly deployed the service and the implementation is in your ear or war.
Then please remove the soap action and try it.

Make sure that you have specified the webservice method and end point interface details in some configuration file based on axis.

Thanks,
NAREN
13 years ago
WSDL - Web Service Description Language. The services which you are going to publish as a server , will be mentioned here. The Services details, method names, protocal names and the URL how you need to access.

All these details will be mentioned in the WSDL. This is like a contract between server and client.

Server will be providing the services mentioned in this wsdl and the client will request for those services.

There are several ways to implement webservices. With the help of AXIS, JAXWS, CXF, Xfire. Like that there are several ways to implement the web services.
13 years ago
You can use JAXB here. You can convert the complex class object to string object and send it as a string.

But you need to have a XSD file for the complex object. and the same complext object XSD file should be there at the client side also.
13 years ago
Hi,
When we generate the classes from wsdl with the help of tools - wsdl2java or wscompile(in jaxws or axis).

We will be getting, service,port,portytpe and implementation java files.

Am not understanding what will be the usage of service and port java classes at Server Side?.

Even at the client side, when we will be able to send a request to the server by creating an instance of service (javax.ws.service) class, what is the main use of service and port java classes?

Please help me here in understanding the details.

Thanks,
Naren
13 years ago