RE: Beginners help
Steffen, I wrote a simple patch to Axis to enable it to process the wsdl file as-is. If you'd like to work on the client while waiting for the wsdl to be fixed, or if they don't fix the wsdl, this should enable you to generate the client stubs. The patch consists of a single method that checks the wsdl file (as a Document instance) to ascertain if it's the one in question, and if so, it removes the name attributes from the and elements in the binding section. It also changes the type attribute value in the elements from "application/binary" to "application/octetstream." It checks the wsdl element for the values of the targetNamespace and name attributes given in the wsdl you're trying to use. Since this is a URI, it won't do anything unless that specific wsdl file is detected. I tested it on your wsdl as well as some others, and it seems to work fine. To load the patch, add the fixDoc() method given below to org.apache.axis.wsdl.symbolTable.SymbolTable.java. Then add the statemt doc = fixDoc(doc); immediately following the statement Document doc = XMLUtils.newDocument(uri, username, password); in the method public void populate(String uri, String username, String password) You will also need to add the following import statements at the beginning of the SymbolTable class import javax.wsdl.extensions.ExtensibilityElement; import com.ibm.wsdl.extensions.mime.MIMEContentImpl; If you have any questions, let me know. -Mark //Remove the "name" attribute from and elements //that are child elements of an element. private Document fixDoc(Document doc){ NodeList opList, childList, mimeList; Node opNode, childNode, mimeNode; NamedNodeMap attList; //If the problem wsdl file is not detected, do nothing try{ if (! (doc.getDocumentElement().getAttributeNode("name").getValue().equals( "IXMLWSservice")) & (doc.getDocumentElement().getAttributeNode("targetNamespace").getValue().equals( "http://tempuri.org/";))) { return doc; } } catch (NullPointerException e){} opList = doc.getElementsByTagName("operation"); for (int i =0; i opNode = opList.item(i); childList = opNode.getChildNodes(); for (int j=0; j < childList.getLength(); j++){ childNode = childList.item(j); if (childNode.getNodeName().equals("input") | childNode.getNodeName().equals("output")){ try{ childNode.getAttributes().removeNamedItem(childNode.getAttributes(). getNamedItem("name").getNodeName()); } catch (NullPointerException e){} } } } mimeList = doc.getElementsByTagName("mime:content"); for (int i=0; i < mimeList.getLength(); i++){ mimeNode = mimeList.item(i); if (mimeNode.hasAttributes()){ if (mimeNode.getAttributes().getNamedItem("type").getNodeValue().equals("application/binary")){ mimeNode.getAttributes().getNamedItem("type").setNodeValue("application/octetstream"); } } } return doc; }// fixDoc() From: "Mark Leone" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Beginners help Date: Fri, 16 Apr 2004 20:36:41 -0400 Oops, sorry about that. Here's the cirrect wsdl file. BTW, the mime:content type attribute having the wrong value is, I think, the reason that XML Spy was complaining about the element as you irignally reported. http://schemas.xmlsoap.org/wsdl/"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; name="IXMLWSservice" targetNamespace="http://tempuri.org/"; xmlns:tns="http://tempuri.org/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:ns1="http://www.borland.com/namespaces/Types";> http://www.borland.com/namespaces/Types"; xmlns="http://www.borland.com/namespaces/Types";> http://schemas.xmlsoap.org/wsdl/"/> http://schemas.xmlsoap.org/soap/http"/> http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:XMLWSIntf-IXMLWS"/> http://schemas.xmlsoap.org/soap/encoding/"; namespa
Re: How To Use TCPMonitor?
>Can tcpmonitor work on services deployed using wsdd, but not a jws as in the >sample shown in the link below ? Yes. It can work on any HTTP transaction.
HTTP 1.1, Persistent Connections and Pipeline support
Hi, I have a few question related to Axis and HTTP 1.1 Does Axis 1.1 support HTTP 1.1, more specifically persistent connections and pipelines? I can see from earlier posting to this group that you are recommended to use the Commons HTTPClient library to use the HTTP 1.1 connection control features. The Axis change log states that "CommonsHTTPSender updated to use Jakarta Commons's HTTPClient 2.0 RC3" which appears to support HTTP 1.1 Persistent connections. Does this mean that Axis 1.1 SOAP client will automatically take advantage of the Peristent Connection and Pipelines or does this has to "hand programmed" into the application? Earlier postings to this news group suggests that Axis 1.1 only support HTTP 1.0. The HTTP 1.1 internet standard states clearly that HTTP 1.0 client will not be allowed to take advantage of a persistent connection through a Proxy. The Proxy will ignore "keep-alive" signal from a HTTP 1.0 client. Is this correctly understood? Is it possible for an Axis 1.1 Client to use HTTPClient to set up a HTTPS 1.1 Persistent connection (HTTP over SSL) through one or more proxies (assuming that the proxies support HTTP 1.1)? Great if anybody which has this knowledge would reply! Best regards, Helge Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html
RE: Need suggestions on web service interop and design
The problem with systinet is it is only available as an add-on to a couple of IDEs and IntelliJ is no one of them. - dave -Original Message- From: Yakulis, Ross (Ross) [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 2:43 PM To: [EMAIL PROTECTED] Subject: RE: Need suggestions on web service interop and design It can be eaiser. Download the Systinet developer tools for eclipse. Given the .java file it generated a doc/literal wsdl. Ross -Original Message- From: Nelson Minar [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 10:30 AM To: [EMAIL PROTECTED] Subject: RE: Need suggestions on web service interop and design >David, you may be understating the problem a bit. Building interoperable, >WS-I compliant SOAP services with Axis is a little involved. Yeah, a little too involved. Shouldn't this be easier? No specific criticism of Axis intended. I'm just amazed at how much effort I'm going through to pass arrays of numbers around.
Re: How To Use TCPMonitor?
Thanks, I see, tweak the generated (using wsdl2java) ServiceLocator will do. Mei- Original Message - From: "Nelson Minar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 18, 2004 8:28 AM Subject: Re: How To Use TCPMonitor? > >Can tcpmonitor work on services deployed using wsdd, but not a jws as in the > >sample shown in the link below ? > > Yes. It can work on any HTTP transaction.
-A OPERATION does not carry through to service?wsdl
Axis 1.2 beta (March 31, 2004) Hi; Using Java2WSDL … -A OPERATION … It does create the soapAction=”foobar”. However, when viewing the wsdl from the tomcat/axis server, soapAction=””. Any ideas? Thanks - dave
Document/literal client app (from WSDL2Java) doesn't work
Hi; I created a server using: java org.apache.axis.wsdl.Java2WSDL -o adder.wsdl -y DOCUMENT -u LITERAL -T 1.2 -l"http://localhost:8080/axis/services/Adder" -n "http://www.thielen.com/" -p"Adder" "http://www.thielen.com/" Adder.Service1 java org.apache.axis.wsdl.WSDL2Java -o server -N"http://www.thielen.com/" "Adder" -s -T 1.2 adder.wsdl And then created a client using: java org.apache.axis.wsdl.WSDL2Java -o jclient -N"http://www.thielen.com/" "Adder" -T 1.2 http://localhost:8080/axis/services/Adder?wsdl The api is very simple: public int Add(int num1, int num2); public String HelloWorld(); But the results are very weird. The soap body sent over for HelloWorld is fine and works: But for Add – it doesn’t have the method name: 1 2 Any idea what’s going on and how to fix? (To totally test, in undeployed the server, rebooted, deployed, and ran it again. So I’m 99% sure it’s not pointing at the wrong code.) Thanks - dave
RE: Document/literal client app (from WSDL2Java) doesn't work
And to follow up, I removed the “-y DOCUMENT -u LITERAL” from the Java2WSDL call and now it all works fine. (Except that I need document/literal for .net interoperability.) Thanks – dave From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Sunday, April 18, 2004 1:24 PM To: Axis Users Subject: Document/literal client app (from WSDL2Java) doesn't work Hi; I created a server using: java org.apache.axis.wsdl.Java2WSDL -o adder.wsdl -y DOCUMENT -u LITERAL -T 1.2 -l"http://localhost:8080/axis/services/Adder" -n "http://www.thielen.com/" -p"Adder" "http://www.thielen.com/" Adder.Service1 java org.apache.axis.wsdl.WSDL2Java -o server -N"http://www.thielen.com/" "Adder" -s -T 1.2 adder.wsdl And then created a client using: java org.apache.axis.wsdl.WSDL2Java -o jclient -N"http://www.thielen.com/" "Adder" -T 1.2 http://localhost:8080/axis/services/Adder?wsdl The api is very simple: public int Add(int num1, int num2); public String HelloWorld(); But the results are very weird. The soap body sent over for HelloWorld is fine and works: But for Add – it doesn’t have the method name: 1 2 Any idea what’s going on and how to fix? (To totally test, in undeployed the server, rebooted, deployed, and ran it again. So I’m 99% sure it’s not pointing at the wrong code.) Thanks - dave
Where does ?wsdl come from
Hi; When I enter http://localhost/./?wsdl – where does that information come from? Some of it is in the autogenerated files but I don’t see all of it there. ??? – thanks - dave
WSDL2Java - set the impl file/class name?
Hi; Is there anyway in WSDL2Java to set the IMPL class/filename? I’ve looked and can’t find anything. Thanks - dave
Is a compiled web service bound to Axis?
Hi; It seems to me that when I have my code autogenerated, it requires Axis jar files. Does this mean I have to autogenerate code for each web server I run on? I am asking because I am building a library that will be used by multiple installations at various companies. Thanks - dave
WSDL generation - redone every time? Also a generateWSDL() example
I've been experimenting with overriding the WSDL that Axis provides in a dynamic fashion. Doing more than just substituting a static file. Following a tip from Tom J I've been doing this via Hander.generateWSDL(). I've learned that WSDL generation happens in org.apache.axis.providers.BasicProvider.generateWSDL() What surprises me is that the work this method does doesn't seem to be cached at all. I'd naively assumed the bytes for the WSDL would be generated once, but instead it looks like a new DOM tree is built everytime the WSDL is created. Is that on purpose, or is this just an optimization that's not yet done? I thought I'd also share my code for intercepting the WSDL. The approach here is to get Axis to generate the WSDL, then capture it and modify the DOM once you have it. Warning: I haven't actually modified anything here, but I think it will work :-) This code belongs in a Handler in the requestFlow. /** Handler to override Axis' default WSDL generation, intercepting ** the DOM and modifying it how we want. **/ public void generateWSDL(MessageContext ctx) throws AxisFault { log.info("Generate WSDL called"); if (ctx.getProperty("WSDL") == null) { log.info("No WSDL was set up yet, hacking it in"); // This method invocation induces Axis to create a WSDL DOM and // put it into the message context new RPCProvider().generateWSDL(ctx); } Document wsdl = (Document)ctx.getProperty("WSDL"); log.info("Found some WSDL, here's a dump of it:"); log.info(XMLUtils.PrettyDocumentToString((Document)wsdl)); // We could modify the wsdl DOM now. }
Can I do a web service as pure xml (no RPC stuff at all)?
Hi; Is there a way (both java and C#) to do a web service so it’s pure xml. What I want is: The wsdl gives a min and max value for attributes that are an enum – but if that attribute is not passed at all, it’s ok because I have a default value. I have 2 soap attachments – that are not files but are very large blocks of data (they are passed to me as input streams). And I then just process the xml in the soap body and the 2 attachments. It seems to me this should be doable, but nothing really talks about it. Thanks - dave
Re: WSDL generation - redone every time? Also a generateWSDL() example
Nelson, yes, it's not cached. no specific reason for not doing it :) Yes, this code should work -- dims --- Nelson Minar <[EMAIL PROTECTED]> wrote: > I've been experimenting with overriding the WSDL that Axis provides in > a dynamic fashion. Doing more than just substituting a static file. > Following a tip from Tom J I've been doing this via Hander.generateWSDL(). > I've learned that WSDL generation happens in > org.apache.axis.providers.BasicProvider.generateWSDL() > > What surprises me is that the work this method does doesn't seem to be > cached at all. I'd naively assumed the bytes for the WSDL would be > generated once, but instead it looks like a new DOM tree is built > everytime the WSDL is created. Is that on purpose, or is this just an > optimization that's not yet done? > > > I thought I'd also share my code for intercepting the WSDL. The > approach here is to get Axis to generate the WSDL, then capture it and > modify the DOM once you have it. Warning: I haven't actually modified > anything here, but I think it will work :-) > > This code belongs in a Handler in the requestFlow. > > /** Handler to override Axis' default WSDL generation, intercepting >** the DOM and modifying it how we want. >**/ > public void generateWSDL(MessageContext ctx) throws AxisFault { > log.info("Generate WSDL called"); > > if (ctx.getProperty("WSDL") == null) { > log.info("No WSDL was set up yet, hacking it in"); > // This method invocation induces Axis to create a WSDL DOM and > // put it into the message context > new RPCProvider().generateWSDL(ctx); > } > Document wsdl = (Document)ctx.getProperty("WSDL"); > log.info("Found some WSDL, here's a dump of it:"); > log.info(XMLUtils.PrettyDocumentToString((Document)wsdl)); > // We could modify the wsdl DOM now. > } = Davanum Srinivas - http://webservices.apache.org/~dims/
NEED samples for performance problems with Axis 1.2Beta or later
Folks, Off and on we get queries about performance problems. So here's a request. If you have ANY concrete examples of performance problems, PLEASE open a bug report ASAP with enough sample code to recreate the problem. If we can't recreate it, we can't fix it. period. Thanks, dims = Davanum Srinivas - http://webservices.apache.org/~dims/
Axis C++ version 1.1 Released
Hi all, Axis C++ team is proud to announce the release of Apache Axis C++ version 1.1. This C++ SOAP engine implementation provides a platform for developing Web services using C/C++ and also includes a client side library for developing C/C++ client applications. This release includes enhancements over the 1.0 release such as document/literal support. In this version the Expat parser is supported by default and the user can optionally configure Axis C++ to use the Xerces parser. Features: - SOAP engine with both client and server support - Partial support for both SOAP 1.1 and SOAP 1.2 - Support for all basic types, complex types and arrays - WSDL2WS tool for building the following C/C++ components from WSDL Server side - Skeletons and Wrappers Client side - Stubs - WSDL2WS tool generated wrappers act as RPC Providers or document/literal providers and they perform Serialization Deserialization Method invocation - WSDLs hosted statically in the server. - Standalone SOAP server (HTTP) - Web server modules for Apache HTTPD 1.3 and apache2(Linux/Windows) - Web based listing of the deployed services and their WSDLs. - Sample web services and client applications. - Documentation for developers and users. Both binary and source are available at Apache mirror sites: http://www.apache.org/dyn/closer.cgi/ws/axis-c/ We invite all interested Web services developers and users to evaluate Axis C++ and give us feedback and help improve Axis C++ to be the best C/C++ SOAP engine. Please direct user questions to [EMAIL PROTECTED] and any bug reports, patches, suggestions for improvement etc. to [EMAIL PROTECTED] IMPORTANT: For the latest documentation refer to: http://ws.apache.org/axis/cpp/documentation.html The Axis C++ Team.
Axis C++ version 1.1 Released
Hi all, Axis C++ team is proud to announce the release of Apache Axis C++ version 1.1. This C++ SOAP engine implementation provides a platform for developing Web services using C/C++ and also includes a client side library for developing C/C++ client applications. This release includes enhancements over the 1.0 release such as document/literal support. In this version the Expat parser is supported by default and the user can optionally configure Axis C++ to use the Xerces parser. Features: - SOAP engine with both client and server support - Partial support for both SOAP 1.1 and SOAP 1.2 - Support for all basic types, complex types and arrays - WSDL2WS tool for building the following C/C++ components from WSDL Server side - Skeletons and Wrappers Client side - Stubs - WSDL2WS tool generated wrappers act as RPC Providers or document/literal providers and they perform Serialization Deserialization Method invocation - WSDLs hosted statically in the server. - Standalone SOAP server (HTTP) - Web server modules for Apache HTTPD 1.3 and apache2(Linux/Windows) - Web based listing of the deployed services and their WSDLs. - Sample web services and client applications. - Documentation for developers and users. Both binary and source are available at Apache mirror sites: http://www.apache.org/dyn/closer.cgi/ws/axis-c/ We invite all interested Web services developers and users to evaluate Axis C++ and give us feedback and help improve Axis C++ to be the best C/C++ SOAP engine. Please direct user questions to [EMAIL PROTECTED] and any bug reports, patches, suggestions for improvement etc. to [EMAIL PROTECTED] IMPORTANT: For the latest documentation refer to: http://ws.apache.org/axis/cpp/documentation.html The Axis C++ Team.
RE: Is a compiled web service bound to Axis?
At this point, a Web service client or server is dependent on the runtime associated with the tools used to build the service. You cannot mix and match the runtimes. But -- you can deploy Axis runtime in any servlet engine. Anne From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Sunday, April 18, 2004 4:48 PM To: Axis Users Subject: Is a compiled web service bound to Axis? Hi; It seems to me that when I have my code autogenerated, it requires Axis jar files. Does this mean I have to autogenerate code for each web server I run on? I am asking because I am building a library that will be used by multiple installations at various companies. Thanks - dave