string « Web Service « Java Enterprise Q&A





1. Passing an UTF8 string via java to a .NET web service    stackoverflow.com

in order to 'feed' a .NET web service from java I do pass xml strings via a direct socket connection over to the server. Everything works wunderbar as long as I don't ...

2. Jave web service custom return type    stackoverflow.com

I have this dilemma. I'm developing a web services. It has to return a list of supported languages. Languages are stored in an enum. Is it better to return (from web method) an enum array ...

3. Problem in getting string from Java web service    stackoverflow.com

I wrote sample web service client and server, where server will the read a file and store the contents in string. Finally server will send that string to client. When I ...

4. Java - Send a UTF-8 string via web service and XML that may contain illegal characters    stackoverflow.com

I have a Web Service written in Java. I want to send some strings in the form of a XML file. But these strings may contain some characters that are recognized ...

5. Java Web Service returns string with > and < instead of > and <    stackoverflow.com

I have a java web service that returns a string. I'm creating the body of this xml string with a DocumentBuilder and Document class. When I view source of the returned ...

6. Turn a string (which is essentially a Document.toString())" back into a Document?    coderanch.com

Originally posted by Goofus McDoofus: In order to return a Document from an RPC (SOAP), I am turning it into a string (for serialization). I want to use stylesheets to display the results on the client. Is there a utility which will turn this String back into a Document (or am I barking up the wrong tree)?

7. XML within string parameter to RPC Service    coderanch.com

Hi all, I am going to be using Axis to invoke an RPC style web service which takes a single string parameter. This string parameter is going to contain an XML message. What I am wondering is if I need to wrap this String in a CDATA section before I invoke the web service? From reading the XML specification it says ...

8. Simple Strings    coderanch.com





11. string[] definiton error in xsd file generated with WSAD    coderanch.com

hi, I'm trying to create a web service in WSAD 5.0. WSAD generates an xsd file: for this file i get three errors: 1. src-import.0: Failed to read imported schema document ...

12. Load xml string into DOM ?    coderanch.com

Hi, I wonder if anyone can help. I have written an application that communicates with a webservice over REST; reads the resultant string (which is the xml document) into an xml dom object, parses and processes it. No problems; except its currently written in VB, and now I want to port it to Java. I've written the code to make the ...

13. unable marshal XML representation to string in memory - please help    coderanch.com

Hi All, I have below classes and I am trying to return Forecast class object as a return type of a web service method that is exposed using AXIS 1.2 RC2 and JiBX : Temperature.java --------------------------------------------------------------------------- import java.io.*; public class Temperature implements Serializable { String temp = "35"; public Temperature() {} public void setTemp(String temp) { this.temp = temp; } public ...

16. Help with soapenc:string vs. xsd:string    coderanch.com

I was able to get around this problem under Axis 1.2RC3 by adding the following type mapping under the element of my wsdd config file. This may even work under the element (and thus for all deployed services) but I haven't tried it yet. Mark





19. XML result as a String    coderanch.com

When the encoding of the SOAP XML and the encoding of the XML result being returned are the same, sending it as a String would seem to work fine. Anybody ever tried that when the XML result is in a different encoding? That may be the criterion for deciding on one approach versus the other: needing to ensure that serialization/deserialization of ...

21. Need Help in passing a string as a attachment    coderanch.com

I am trying to pass a string as a attachment, but when I examine what is being sent it looks as if the string is being passed in the Body. According to weblogic : Certain Java data types, if used as parameters or return values of a method that implements a Web Service operation, are automatically transported as SOAP Attachments (rather ...

22. how to handle xml as strings?    coderanch.com

I hava rpc encoded style web service that returns a string as response. In the string I'll storing a xml file which has CDATA sections and some inline DTD. My problem is sometimes I am getting an error from axis serialization classes saying that there is an invalid character in xml. So is it better to convert the xml data into ...

23. Problem returning a String array from a web service    coderanch.com

package client; import javax.xml.ws.WebServiceRef; import endpoint.StockQuoteService; import endpoint.StockQuote; public class Client { @WebServiceRef(wsdlLocation="http://localhost:8080/StockQuote/StockQuoteService?WSDL") static StockQuoteService service; public static void main(String[] args) { Client client = new Client(); client.getStockQuoteInfo(); } public void getStockQuoteInfo() { try { StockQuote port = service.getStockQuotePort(); String[] price = port.getPrice("Abc"); System.out.println("Stock Price = " + price[0]); System.out.println("Stock Price = " + price[1]); } catch(Exception e) { e.printStackTrace(); } ...

24. NumberFormatException: For input string: "" in XsTypeConverter    coderanch.com

My webservice request contains a tag for an integer field. When this tag is populated with an integer or when I don't include this tag in the request, the web services works fine but when I send an empty tag for this integer field, I get this NubmerFromatException in weblogic when it constructs soap request (stack trace below) Soap Request : ...

25. Should I use xsd:gDay, xsd:gMonth, xsd:gYear OR just simple xsd:string    coderanch.com

hello, I have some elements need to define for the day, month, year. In the WSDL, if I define the day as then the soap binding will bind it to vendor specific Java Object - I am using websphere 5.1, so it mapped to com.ibm.ws.webservices.engine.types.Day type in the SEI function parameter. I am wondering if my client ...

27. Convert String object to SOAPMessage    coderanch.com

28. How to return XML data as a string?    coderanch.com

Hi, I'm a newbie to web services and I'm having difficulty returning an "xml formatted" string from a simple java class. All of the "less-than" and "greater-than" symbols get converted to: "& lt;" and "& gt;" without the spaces respectively. I'm currently using JDeveloper and having it create the WSDL based on my java class. The return type in WSDL is ...

29. Processing XML String Data in Webservices    coderanch.com

Hi, I am creating a call logging webservice that will accept an xml string, validate the xml headers if it has the correct format, then write an xml file from the input to the server. The code is working from accepting the xml string, validating headers, and writing to the server. The problem is, it only accepts limited number of strings, ...

30. Returning an array of strings from an OMElement response.    coderanch.com

Hi everyone, I have Web Service that returns an array of strings and I'm using an AXIOM based client to invoke it. My rather simple question is how do I go about extracting the array of strings which is embedded within the OMElement response? The code I have currently as shown below, only returns the first element in the array. Any ...

31. Web service return complex data type vs. XML string    coderanch.com

Trying to compare the advantage of a web service method returning complex type or xml string in different situations. It looks more generic to return a xml string to represent the complex type object, but if so, what is the need to make a web service return a complex data type (i.e. a pojo, a bean). I know there must be ...

34. Passing XML document to Web service :: Operation param's type or ?    coderanch.com

Hi Guys, I'm creating a WSDL for my web service and trying to make it as generic one. I'm using document\literal style for the operation. Input and output for the operation will be XML fragment like below.. Request xml ------------ ....... Respone xml --------------- 123 Please note element is envelope for the input ...

36. how to convert one string to JAXBElement    coderanch.com

Hi! If you are developing a client that is to use JAXB, then the first step is to generate JAXB bean classes using XJC (the JAXB XML schema compiler). With these classes in your project, you can then create a Source object from which the XML data of the request is read along these lines: ObjectFactory theObjFactory = new ObjectFactory(); // ...

37. XSD Enum problem: POJO not generatd when numbers are used in definition, base type =xs:string    coderanch.com

Hi all, I am trying to write an XSD- Enum type. And then using Jaxb-xsd tool : XJCFacade I try to get the corresponding java class. But I observe that though I 've written everything in correct syntax corresponding enum class doesn't get generated ! the type is similar to the below one:

38. SOAPBody as a String    coderanch.com

39. web service "int myMethod(int i, String s)"    coderanch.com

Hi! Using Java SE 6, you can use the wsgen command to create artifacts (such as WSDL and XML schema) from a class annotated with JAX-WS annotations. This is probably the simplest way. Once you have generated a WSDL, you can edit it to suite your needs. In fact, I think one annotation is enough for the absolute minimum: package com.ivan; ...

41. SOAPMessage as String    coderanch.com

42. Axiom soapbody to string    coderanch.com

45. Getting Exception | Premature End of file | Parsing string xml    coderanch.com

Hi I am trying to test a webservice locally on my system which takes a string xml input parameter as request. For this i am converting my xml to string via string builder and passing it as a request to the webservice. Now, the webservice call is happening fine and i can get to the backend server code. But when i ...

46. Getting Fault string, and possibly fault code, not set in UDDI4J    coderanch.com

import org.uddi4j.client.UDDIProxy; import org.uddi4j.response.AuthToken; import org.uddi4j.transport.TransportFactory; public class CreateNewBusiness { public static void main (String args[]){ String inquiryURL = "http://localhost:8080/juddi/inquiry"; String publishURL = "http://localhost:8080/juddi/publish"; String userId = "juddi"; String credential = "juddi"; String transportClass = "org.uddi4j.transport.ApacheAxisTransport"; System.setProperty(TransportFactory.PROPERTY_NAME, transportClass); UDDIProxy proxy = new UDDIProxy(); try { proxy.setInquiryURL(inquiryURL); proxy.setPublishURL(publishURL); AuthToken token = proxy.get_authToken(userId, credential); System.out.println("Security authToken:" + token.getAuthInfoString()); } catch(Exception e ) { ...

47. Web service XML String    forums.oracle.com

48. How to get web service returns to a String    forums.oracle.com