Search Results

Search found 1376 results on 56 pages for 'soap'.

Page 21/56 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Create a service that connects to remote database and uses public key encryption

    - by Leedsoft Solutions
    I have been searching all day and reading many tutorials and still I am confused. I am working on a project that has the following requirements as specified by the client (customer - not to be confused with client app): Connect to a remote server and verify that connection was successful. Connect to Web service on said server via SOAP. Authenticate with service using public key encryption Upon successful authentication, push a list of products and categories to a MSSQL database on remote server via the Web service. The client is a Winforms application written in C#. So far, I have created a WCF Service Application with separate services for the products and categories but I cannot figure the rest out. Can anyone point me in the direction of a tutorial or tutorials that cover these requirements? Many thanks in advance! Joe

    Read the article

  • Location of various javax.xml.* packages within the Java 6 SDK.

    - by celestialorb
    Alright, so recently I was using Notepad++ for all of my programming needs, but I've started using Eclipse for larger-scale Java projects now. I decided to pick up an old project of mine which used various classes within the "javax.xml.*" namespaces. When I was compiling and running the program with Notepad++ it worked just fine, however Eclipse can't seem to find these packages. My question is this, since I obviously have the classes somewhere within my current installation of JDK 6 (since I had no problems when using Notepad++), where can I find the location of the .JAR file(s) that include these namespaces/classes so that I can add them to my Eclipse project? Thanks for any help you can give me! Regards, celestialorb Also, if you're curious about the specific packages I'm looking for they are: javax.xml.soap.* javax.xml.transform.* Thanks again!

    Read the article

  • WCF client hangs on response

    - by JohnIdol
    I have a WCF client (running on Win7) pointing to a WebSphere service. All is good from a test harness (a little test fixture outside my web app) but when my calls to the service originate from my web project one of the calls is extremely slow to deserialize (it takes up to 10 times longer) and not just the first time. I can see from fiddler that the response comes back quickly but then the WCF client hangs on the response itself for more than a minute before the next line of code is hit by the debugger, almost if the client was having trouble deserializing. This happens only if in the response I have a given pdf string, base64 encoded chunked. If for example the service raises a fault (this pdf string is not there) then the response is deserialized immediately. Again, If I send the exact same envelope through Soap-UI or from outside the web project all is good. I am at loss - What should I be looking for and is there some config setting that might do the trick? Any help appreciated!

    Read the article

  • curl issue with URL not connecting

    - by bmucklow
    So I'm not a very good network person so I was hoping someone could point me in the right direction to figuring out what I am doing wrong. I am trying to use curl to post a SOAP message. I am running the following: curl -d "string of xml message" -H "Content-Type:text/xml; charset=utf-8" ":/" This results in a 'Connection refused' message. So I try pinging ip by itself...no problems. Then I think maybe I need http://:/ so I tried pinging http:// and I get: unknown host http:// yet if I ping the IP by itself I get no issues. Any thoughts on where to start debugging this issue?

    Read the article

  • Complex class using PHP soapserver mapclass

    - by user559343
    Hi all, I need to create a server for processing SOAP requests. I have the wsdl and xml specifications, but I have a doubt: the xml elements are pretty complex, they are not simple type, but they have parent/child relationships (e.g. I have a Book class with an author subclass). How can I map this to PHP classes? In this example, should I create an author class i.e.: class Author { public $name; public $surname; } and then class Book { public $author; } will $author be a class of type Author? Or a typed array? Any help will be appreciated Thanks and happy new year!

    Read the article

  • Sending a byte array from PHP to WCF problem

    - by shin
    Hi I have this problem: I have to send a byte array (encoded photo) from my PHP client to the WCF host. when I do a var_dump() on my array in PHP I get an array[2839] which is ok but on the server side when i debug I see that received array is only byte[5]...any idea how I can fix it? I used code like this $file = file_get_contents($_FILES['Filedata']['tmp_name']); $byteArr = str_split($file); foreach ($byteArr as $key=>$val) { $byteArr[$key] = ord($val); } $client = new SoapClient('http://localhost:8000/MgrService?wsdl', array( 'location' => 'http://localhost:8000/MgrService/SOAP11', 'trace' => true, 'soap_version' => SOAP_1_1 )); $par1->profileId = 13; $par1->photo = $byteArr; $client->TestByte($par1); And as I wrote erlier on the wcf host i get only byte[5] :/ maybe it needs some decoding to right soap serialize? should I use Base64 decoding or sommthing?? General I just want to upload posted file to c# function with byte[] as parameter :/ Help

    Read the article

  • Easiest RPC client method in PHP

    - by T.K.
    I've been asked to help a friend's company to bring up a web application. I have very limited time and I reluctantly accepted the request, at one condition. As most of the logic goes on in the back-end, I suggested that I would finish the complete back-end only, allowing a front-end developer to simply interface with my backend. I plan to do the back-end in Java EE or Python (with Pylons). It does not really matter at this point. I plan to have my back-end completely ready and unit-tested, so that my input will hardly be needed after my work is done. I know they have a PHP programmer, but as far as I could tell he is a real rookie. I want him to basically interface with my backend's services in the easiest possible way, with no way of him "stuffing" it up. It's basically a CRUD-only application. I could implement the backend as accessible through a webservice such as XML-RPC or SOAP. Even a RESTful API could be possible. However, my main objective is to make something that complete "noob" PHP programmer can easily interface with without getting confused. Preferably I do not even want to talk to him because I generally have an extremely busy schedule, and doing "support calls" is not something I am willing to do. Which approach should I choose? I would welcome any suggestions and inputs!

    Read the article

  • Choosing a method for a webservice

    - by Wrikken
    I'm asked to set up a new webservice which should be easily usable in whatever language (php, .NET, Java, etc.) possible. Of course rolling my own can be done, accepting different content-types (xml / x-www-form-urlencoded (normal post) / json / etc.), but an existing method or mechanism would of course be prefered, cutting down time spent on development for the consumers of the service. The webservice does accept modifications / sets (it is not only simply data retrieval), but those will most likely be quite a lot less then gets (we estimate about 2.5% sets, 97.5 gets). The term webservice here indicates the protocol should go over HTTP, not being able to implement it totally client sided (javascript in the end-users browser etc.), as it needs specific user authentication. Both gets and sets are pretty light on the parameter count (usually 1 to 4). Methods like REST (which I'd prefer for only gets), XML-RPC & SOAP (might be a bit overkill, but has the advantage of explicitly defined methods and returns) are the usual suspects. What in your opinion / experience is the most widely 'spoken' and most easily implementable protocol in different languages (seen from the consumers' viewpoint) which could fullfill this need?

    Read the article

  • REST API - why use PUT DELETE POST GET?

    - by Andre
    So -i was looking through some articles on creating REST API's. And some of them suggest using all types of HTTP requests: like PUT DELETE POST GET. So - we would create for example index.php and write API this way: $method = $_SERVER['REQUEST_METHOD']; $request = split("/", substr(@$_SERVER['PATH_INFO'], 1)); switch ($method) { case 'PUT': ....some put action.... break; case 'POST': ....some post action.... break; case 'GET': ....some get action.... break; case 'DELETE': ....some delete action.... break; } Ok - granted - I don't know much baout web services (yet). But - wouldn't it be easier to just accept JSON object through normal $_POST and then respond in JSON as well. We can easily serialize/deserialize via php's json_encode and json_decode and do whatever we want with that data without having to deal with different HTTP request methods... Am I missing something? UPDATE 1: Ok - after digging through various API's and learning a lot about XML-RPC, JSON-RPC, SOAP, REST I came to a conclusion that this type of API is sound. Actually stack exchange is pretty much using this approach on their sites and I do think that these people know what they are doing Stack Exchange API.

    Read the article

  • Consuming a HTTPS Web Service in .Net 3.5 Web Project

    - by Chris M
    I'm trying to consume a webservice that ONLY runs on HTTPS but using the "add service" method in VS or using the WSDL to generate a code file leaves me with a web service that states its http... <wsdl:service name="OGServ"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">XML Web Services element of OGServ Gateway</wsdl:documentation> <wsdl:port name="OGServSoap" binding="tns:OGServSoap"> <soap:address location="http://ogserv.domain.co.uk/ogwsrv/og.asmx" /> </wsdl:port> <wsdl:port name="OGServSoap12" binding="tns:OGServSoap12"> <soap12:address location="http://ogserv.domain.co.uk/ogwsrv/og.asmx" /> </wsdl:port> </wsdl:service> Would this be the reason that even when I change the app.config (generated by the add-service) endpoint address to https it says it was expecting HTTP? The error: EC.Tests.OGGatewayLayerTest (TestFixtureSetUp): System.ArgumentException : The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via

    Read the article

  • Renaming the argument name in JAX-WS

    - by user182944
    I created a web service using JAX-WS in RSA 7.5 and Websphere 7 using bottom-up approach. When I open the WSDL in SOAP UI, then the arguments section is appearing like this: <!--Optional--> <arg0> <empID>?</empId> </arg0> <!--Optional--> <arg1> <empName>?</empName> </arg1> <!--Optional--> <arg2> <empAddress>?</empAddress> </arg2> <!--Optional--> <arg3> <empCountry>?</empCountry> </arg3> The service method takes the above 4 elements as the parameters to return the employee details. 1) I want to rename this arg0, arg1, and so on with some valid names. 2) I want to remove the <!--optional--> present above the arg tags. (For removing the <!--optional--> from elements name, I used @XMLElement(required=true)). But I am not sure where exactly to use this annotation in this case :( Please help. Regards,

    Read the article

  • Improving performance for WRITE operation on Oracle DB in Java

    - by Lucky
    I've a typical scenario & need to understand best possible way to handle this, so here it goes - I'm developing a solution that will retrieve data from a remote SOAP based web service & will then push this data to an Oracle database on network. Also, this will be a scheduled task that will execute every 15 minutes. I've event queues on remote service that contains the INSERT/UPDATE/DELETE operations that have been done since last retrieval, & once I retrieve the events for last 15 minutes, it again add events for next retrieval. Now, its just pushing data to Oracle so all my interactions are INSERT & UPDATE statements. There are around 60 tables on Oracle with some of them having 100+ columns. Moreover, for every 15 minutes cycle there would be around 60-70 Inserts, 100+ Updates & 10-20 Deletes. This will be an executable jar file that will terminate after operation & will again start on next 15 minutes cycle. So, I need to understand how should I handle WRITE operations (best practices) to improve performance for this application as whole ? Current Test Code (on every cycle) - Connects to remote service to get events. Creates a connection with DB (single connection object). Identifies the type of operation (INSERT/UPDATE/DELETE) & table on which it is done. After above, calls the respective method based on type of operation & table. Uses Preparedstatement with positional parameters, & retrieves each column value from remote service & assigns that to statement parameters. Commits the statement & returns to get event class to process next event. Above is repeated till all the retrieved events are processed after which program closes & then starts on next cycle & everything repeats again. Thanks for help !

    Read the article

  • Advice? SSO in N-tiered SOA with mixture of REST and SOAP services

    - by Tyler
    Hi gang, We are moving to SSO in our N-tiered SOA applications. If all the services were SOAP, I'd be ok with just the WS-Security, WS-Trust, WS-Federation set of protocols. My problem is that many of the services are RESTful (ironic) and those protocols do not address REST services. What is your advice for SSO protecting the REST services in an N-tiered SOA architecture with the following requirements: ideally claims-based identity information available to the REST services original user (eg. bootstrap) information must flow through the tiers so that each service can "ActAs" or "OnBehalfOf" the user support sequences like: WebApp -- REST Svc -- SOAP Svc WebApp -- REST Svc1 -- REST Svc2 WebApp -- SOAP Svc -- REST Svc WebApp -- SOAP Svc1 -- SOAP Svc2 support SSO (and SSOff) service/web app platforms: ASP.Net and WCF Java end-user client platforms: .Net (WSE 3.0 and WCF) flash 10 java javascript and AJAX Normally I'm good at climbing / bashing my way through walls, but this one's knocked me flat. Hopefully with your help, we can get over this one. Thanks, Tyler

    Read the article

  • iPhone SDK / Objective C Syntax Question

    - by Koppo
    To all, I was looking at the sample project from http://iphoneonrails.com/ and I saw they took the NSObject class and added methods to it for the SOAP calls. Their sample project can be downloaded from here http://iphoneonrails.com/downloads/objective_resource-1.01.zip. My question is related to my lack of knowledge on the following syntax as I haven't seen it yet in a iPhone project. There is a header file called NSObject+ObjectiveResource.h where they declare and change NSObject to have extra methods for this project. Is the "+ObjectiveResource.h" in the name there a special syntax or is that just the naming convention of the developers. Finally inside the class NSObject we have the following #import <Foundation/Foundation.h> @interface NSObject (ObjectiveResource) // Response Formats typedef enum { XmlResponse = 0, JSONResponse, } ORSResponseFormat; // Resource configuration + (NSString *)getRemoteSite; + (void)setRemoteSite:(NSString*)siteURL; + (NSString *)getRemoteUser; + (void)setRemoteUser:(NSString *)user; + (NSString *)getRemotePassword; + (void)setRemotePassword:(NSString *)password; + (SEL)getRemoteParseDataMethod; + (void)setRemoteParseDataMethod:(SEL)parseMethod; + (SEL) getRemoteSerializeMethod; + (void) setRemoteSerializeMethod:(SEL)serializeMethod; + (NSString *)getRemoteProtocolExtension; + (void)setRemoteProtocolExtension:(NSString *)protocolExtension; + (void)setRemoteResponseType:(ORSResponseFormat) format; + (ORSResponseFormat)getRemoteResponseType; // Finders + (NSArray *)findAllRemote; + (NSArray *)findAllRemoteWithResponse:(NSError **)aError; + (id)findRemote:(NSString *)elementId; + (id)findRemote:(NSString *)elementId withResponse:(NSError **)aError; // URL construction accessors + (NSString *)getRemoteElementName; + (NSString *)getRemoteCollectionName; + (NSString *)getRemoteElementPath:(NSString *)elementId; + (NSString *)getRemoteCollectionPath; + (NSString *)getRemoteCollectionPathWithParameters:(NSDictionary *)parameters; + (NSString *)populateRemotePath:(NSString *)path withParameters:(NSDictionary *)parameters; // Instance-specific methods - (id)getRemoteId; - (void)setRemoteId:(id)orsId; - (NSString *)getRemoteClassIdName; - (BOOL)createRemote; - (BOOL)createRemoteWithResponse:(NSError **)aError; - (BOOL)createRemoteWithParameters:(NSDictionary *)parameters; - (BOOL)createRemoteWithParameters:(NSDictionary *)parameters andResponse:(NSError **)aError; - (BOOL)destroyRemote; - (BOOL)destroyRemoteWithResponse:(NSError **)aError; - (BOOL)updateRemote; - (BOOL)updateRemoteWithResponse:(NSError **)aError; - (BOOL)saveRemote; - (BOOL)saveRemoteWithResponse:(NSError **)aError; - (BOOL)createRemoteAtPath:(NSString *)path withResponse:(NSError **)aError; - (BOOL)updateRemoteAtPath:(NSString *)path withResponse:(NSError **)aError; - (BOOL)destroyRemoteAtPath:(NSString *)path withResponse:(NSError **)aError; // Instance helpers for getting at commonly used class-level values - (NSString *)getRemoteCollectionPath; - (NSString *)convertToRemoteExpectedType; //Equality test for remote enabled objects based on class name and remote id - (BOOL)isEqualToRemote:(id)anObject; - (NSUInteger)hashForRemote; @end What is the "ObjectiveResource" in the () mean for NSObject? What is that telling Xcode and the compiler about what is happening..? After that things look normal to me as they have various static and instance methods. I know that by doing this all user classes that inherit from NSObject now have all the extra methods for this project. My question is what is the parenthesis are doing after the NSObject. Is that referencing a header file, or is that letting the compiler know that this class is being over ridden. Thanks again and my apologies ahead of time if this is a dumb question but just trying to learn what I lack.

    Read the article

  • iphone web service access

    - by malleswar
    Hi, I have .net webservice methods login and summary. After getting the result from login, I need to show second view and need to call summary method. I am following this tutorial. http://icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/ I created two new classes loginaccess.h and loginaccess.m. @implementation LoginAccess @synthesize ResultString,webData, soapResults, xmlParser; -(NSString*)LoginCheck:(NSString*)userName:(NSString*)pwd { NSString *soapMessage = [NSString stringWithFormat: @"\n" "\n" "\n" "\n" "%@" "%@" "" "\n" "\n",userName,pwd ]; NSLog(soapMessage); NSURL *url = [NSURL URLWithString:@"http://www.XXXXXXXXX.com/service.asmx"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]]; [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest addValue: @"http://XXXXXXXXm/Login" forHTTPHeaderField:@"SOAPAction"]; [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPMethod:@"POST"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if( theConnection ) { webData = [[NSMutableData data] retain]; } else { NSLog(@"theConnection is NULL"); } //[nameInput resignFirstResponder]; return ResultString; } -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength: 0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [webData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"ERROR with theConenction"); [connection release]; [webData release]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"DONE. Received Bytes: %d", [webData length]); NSString *theXML = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; NSLog(theXML); [theXML release]; if( xmlParser ) { [xmlParser release]; } xmlParser = [[NSXMLParser alloc] initWithData: webData]; [xmlParser setDelegate: self]; [xmlParser setShouldResolveExternalEntities: YES]; [xmlParser parse]; [connection release]; [webData release]; } -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *) namespaceURI qualifiedName:(NSString *)qName attributes: (NSDictionary *)attributeDict { if( [elementName isEqualToString:@"LoginResult"]) { if(!soapResults) { soapResults = [[NSMutableString alloc] init]; } recordResults = TRUE; } } -(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if( recordResults ) { [soapResults appendString: string]; } } -(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if( [elementName isEqualToString:@"LoginResult"]) { recordResults = FALSE; ResultString = soapResults; NSLog(@"Login"); [VariableStore setStr:ResultString]; NSLog(soapResults); [soapResults release]; soapResults = nil; } } @end I am calling LoginCheck method and based on result I want to show the second view. Here after finishing of the button touch down event, it enter into did end element, so I am always getting nil value. If I use the same code controller it works fine as I push second view controller in didendelement. Please give me some samples to place the web service calls in differnt class and how to call them in viewcontrollers. Regards, Malleswar

    Read the article

  • PHP and XPath Loop

    - by user1794852
    Thank you all in advance. I've got some great answers to my sometimes stupid questions, so thank you again. I'm trying to parse a SOAP response using PHP, Xpath (namespaces) and SimpleXML. Down below is a snippet of the Response. What I need to do is loop through each <ns1:file></ns1:file> and add it to a DB. But I'm not sure how to do that. Please help! Namespace Stuff $x = simplexml_load_string($response); $x->registerXPathNamespace('ns1', 'http://ws.icontent.idefense.com/V3/2'); Here's the response: <ns1:mal_files> <ns1:file> <ns1:id>2895144</ns1:id> <ns1:md5>2189c3d3857ba0cabd19c8aa031d63cd</ns1:md5> <ns1:sha1>c20b26148caa059ecf85e9b29df4e28e8354d655</ns1:sha1> <ns1:path>%WINDIR%\Temp\Temporary Internet Files\Content.IE5\K9ANOPQB\1219831[1].htm</ns1:path> <ns1:size>110</ns1:size> <ns1:code_available>true</ns1:code_available> <ns1:len_char>fixed</ns1:len_char> </ns1:file> <ns1:file> <ns1:id>2895147</ns1:id> <ns1:md5>a533825ef1752630a300125b3eef6825</ns1:md5> <ns1:sha1>ec7feb1414b3c2e720f6c06e2750421b73634f87</ns1:sha1> <ns1:path>%WINDIR%\Temp\Temporary Internet Files\Content.IE5\4PMB8T67\bg[1].jpg</ns1:path> <ns1:size>707</ns1:size> <ns1:code_available>true</ns1:code_available> <ns1:len_char>fixed</ns1:len_char> </ns1:file> <ns1:file> <ns1:id>2895155</ns1:id> <ns1:md5>c88724e985efcc82173c0d3aa0b77dfd</ns1:md5> <ns1:sha1>ecc042ca06aac988cd4593bb2b25fa39c4b2a819</ns1:sha1> <ns1:path>%WINDIR%\Prefetch\24604775.EXE-3ADEC0C2.pf</ns1:path> <ns1:size>44940</ns1:size> <ns1:code_available>true</ns1:code_available> <ns1:len_char>fixed</ns1:len_char> </ns1:file> <ns1:file> <ns1:id>2895158</ns1:id> <ns1:md5>422a011793af6195ea517c2c4a26bdbc</ns1:md5> <ns1:sha1>f449240c091c27e2531342d6b291d6a7e4655834</ns1:sha1> <ns1:path>%WINDIR%\Temp\Temporary Internet Files\Content.IE5\KPYV0TM7\gamesleap[1].png</ns1:path> <ns1:size>2676</ns1:size> <ns1:code_available>true</ns1:code_available> <ns1:len_char>fixed</ns1:len_char> </ns1:file> </ns1:mal_files> PHP Code $md5 = $x->xpath('//ns1:mal_files/ns1:file/ns1:md5'); // Returns array :( The PHP code returns an Array of all MD5 for every <ns1:file></ns1:file> and that's not what I need. What I need is to loop through each of the (nodes?) for each of the <ns1:file> keying on the <ns1:id> and add all their associated elements (id, md5, sha1, etc) as a record, then move onto the next <ns1:file> and repeat. And obviously the PHP I'm using returns an array, which doesn't work here. Hopefully I've made my question clear... I appreciate any help. Thanks!

    Read the article

  • JAX-WS MarshalException with custom JAX-B bindings: Unable to marshal type "java.lang.String" as an

    - by MoneyMark
    I seem to be having an issue with Jax-WS and Jax-b playing nicely together. I need to consume a web-service, which has a predefined WSDL. When executing the generated client I am receiving the following error: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.SAXException2: unable to marshal type "java.lang.String" as an element because it is missing an @XmlRootElement annotation] This started occurring when I used an external custom binding file to map needlessly complex types to java.lang.string. Here is an excerpt from my binding file: <?xml version="1.0" encoding="UTF-8"?> <bindings xmlns="http://java.sun.com/xml/ns/jaxb" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"> <bindings schemaLocation="http://localhost:7777/GESOR/services/RegistryUpdatePort?wsdl#types?schema1" node="/xs:schema"> <bindings node="//xs:element[@name='StwrdCompany']//xs:complexType//xs:sequence//xs:element[@name='company_name']"> <property> <baseType name="java.lang.String" /> </property> </bindings> <bindings node="//xs:element[@name='StwrdCompany']//xs:complexType//xs:sequence//xs:element[@name='address1']"> <property> <baseType name="java.lang.String" /> </property> </bindings> <bindings node="//xs:element[@name='StwrdCompany']//xs:complexType//xs:sequence//xs:element[@name='address2']"> <property> <baseType name="java.lang.String" /> </property> </bindings> ...more fields </bindings> </bindings> When executing wsimport against the provided WSDL, StwrdCompany is generated with the following variables declared: @XmlRootElement(name = "StwrdCompany") public class StwrdCompany { @XmlElementRef(name = "company_name", type = JAXBElement.class) protected String companyName; @XmlElementRef(name = "address1", type = JAXBElement.class) protected String address1; @XmlElementRef(name = "address2", type = JAXBElement.class) ... more fields ... getters/setters @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "value" }) public static class CompanyName { @XmlValue protected String value; @XmlAttribute protected Boolean updateToNULL; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the updateToNULL property. * * @return * possible object is * {@link Boolean } * */ public boolean isUpdateToNULL() { if (updateToNULL == null) { return false; } else { return updateToNULL; } } /** * Sets the value of the updateToNULL property. * * @param value * allowed object is * {@link Boolean } * */ public void setUpdateToNULL(Boolean value) { this.updateToNULL = value; } ... more inner classes } } Finally, here is the associated snippet from the WSDL that seems to be causing such grief. <xs:element name="StwrdCompany"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="1" minOccurs="0" name="company_name" nillable="true"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute default="false" name="updateToNULL" type="xs:boolean"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element maxOccurs="1" minOccurs="0" name="address1" nillable="true"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute default="false" name="updateToNULL" type="xs:boolean"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> ... more fields in the same format <xs:element maxOccurs="1" minOccurs="0" name="p_source_timestamp" nillable="false" type="xs:string"/> </xs:sequence> <xs:attribute name="company_xid" type="xs:string"/> </xs:complexType> </xs:element> The reason for the custom binding is so I can map user input from a pojo into the StwrdCompany object more easily, whether it be direct instantiation or through the use of Dozer for bean mapping. I was unable to successfully map between the objects without the custom binding. Finally, one other thing I tried was setting a globalBinding definition: <globalBindings generateValueClass="false"></globalBindings> This caused the server to through an argument mismatch exception since the Soap Message was using xs:string xml types instead of passing the defined complex types, so I abandoned that idea. Any insight into what is causing the MarshalException or how to go about solving the issue of calling the webservice and mapping these objects more easily, is greatly appreciated. I've been searching for days and I sadly think I am stumped.

    Read the article

  • SOAP web client on Android

    - by BANSAL MOHIT
    Hi I am trying to create a web service client for the android but i am stuck really bad Attached is my code and WSDL file. Please help /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.me.androidapplication1; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapPrimitive; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.AndroidHttpTransport; import org.xmlpull.v1.XmlPullParserException; /** * * @author bansal */ public class MainActivity extends Activity { private String SOAP_ACTION = "http://src/getNews"; private String METHOD_NAME = "getNews"; private String NAMESPACE = "http://src/"; private static final String URL ="http://128.205.201.202:8080/RssService /RssServiceService?WSDL"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); TextView tv = new TextView(this); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("ticker","NASDAQ:INFY"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive p = (SoapPrimitive) envelope.getResponse(); tv.setText("Response " + p); } catch (Exception ex) { ex.printStackTrace(); } setContentView(tv); // ToDo add your GUI initialization code here } } Thanks

    Read the article

  • How to create multiple SOAP webservice clients in same netbeans 6.8 project

    - by James Black
    I have a project that is largely just to help one application make connections to an SAP server, for real-time updates. So the first web service client works fine, but I try to create a second and it seems to hang and I expect part of the problem is that it is trying to create a new Service class, but the namespace for all the webservices are identical, but the wsdl is obviously different, so it can't create the client. I can do it manually, by just having Service1, Service2, etc, or making some other change, but the issue is that Netbeans should be able to do this easily. I can't use Eclipse as the wsimport parameters that Netbeans uses works, in Eclipse I would need to do too much to make it work, so I will go with the easier tool. I don't want to create a new project for each webservice, as that just seems to be perpetuating a design error. So, how can I easily create multiple webservice clients that will all have the same target namespace, using Netbeans 6.8+?

    Read the article

  • Generate webservice soap client from wsdl when server using Windows Integrated Authentication

    - by James Black
    There is an SAP server that has some webservices I need to use, so I am trying to use wsimport to generate the client stubs. I don't want to find all the wsdls and schemas that are referenced and modify them to do it locally, as that isn't sustainable, if they service should change. So, how can I use wsimport to fetch a wsdl and generate the client stubs when the server is using Windows Integrated Authentication, where even the wsdl requires credentials.

    Read the article

  • Soap WSDL with Null

    - by Simon
    Hello, i need to specifi parametr of function witch is nullable. this dont work: <message name="SaveRequest"> <part name="serialNumber" nillable="true" type="xsd:int"/> </message> please any help is welcome! simon

    Read the article

  • Code generating SOAP Web Service Proxy objects yourself - C#/.NET 3.5/T4

    - by tyndall
    Is there a framework or code already available that will give me more control over the code that gets generated based off my web references? I'm working at a new company. And the Web Services Proxies are all self contained in their own assembly. I would really rather generate this whole project. Every time they change something on the Services-side (Java) the WSDL references have to be dropped and re-added. (I can't figure out what those guys are doing on their end that messes with the WSDL bad enough that this needs to be done so much) Their are 10 of these references. I'd rather codegen the whole thing at compile time. Every time. What are my options?

    Read the article

  • Create SOAP message from WSDL using axiom

    - by code-gijoe
    Hi, I'm a starting a project which consist in sending a request to a web-service (which is already available) and parsing the response. I have the WSDL and URL endpoints. Does anyone have a startup tutorial on how to build something from there? I would like to use Axis2 + Axiom to send the service request and receive and process the response. I'm using eclipse as dev env. I've been search for a tut on how to do this but with no success. Any suggestion would be greatly appreciated!

    Read the article

  • Opening of the spWeb.ContentTypes gives SOAP Exception 0x80004004

    - by mdi
    Hi everybody! I have the code which going through the sharepoint contenttypes and changes needed field display names. On my local server everything works fine, but on the client side it gives me an error: Microsoft.SharePoint.SPException: Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) --- System.Runtime.InteropServices.COMException (0x80004004): Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWebInternal(String bstrUrl, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags) at Microsoft.SharePoint.Library.SPRequest.OpenWebInternal(String bstrUrl, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags) --- End of inner exception stack trace --- at Microsoft.SharePoint.Library.SPRequest.OpenWebInternal(String bstrUrl, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags) at Microsoft.SharePoint.SPWeb.InitWebPublic() at Microsoft.SharePoint.SPWeb.get_ServerRelativeUrl() at Microsoft.SharePoint.SPWeb.get_Url() at Microsoft.SharePoint.SPContentTypeCollection.FetchCollection() at Microsoft.SharePoint.SPContentTypeCollection..ctor(SPWeb web, Boolean bAll) at Microsoft.SharePoint.SPWeb.get_ContentTypes() the code is below: SPWebApplication webApp = SPWebService.ContentService.WebApplications[someGuid]; foreach (SPSite spSite in webApp.Sites) { using (SPWeb spWeb = spSite.RootWeb) { try { foreach (SPContentType spContentType in spWeb.ContentTypes) { ... }}}.. Could anybody provide me with workaround or with the reason of the problem.

    Read the article

  • Secure WS client with UsernameToken(SOAP security header)

    - by user79163
    Hi, I'm trying to secure my WS client to be able to call the WS. My code looks like this: SendSmsService smsService = new SendSmsService(); SendSms sendSMS = smsService.getSendSms(); BindingProvider stub = (BindingProvider)sendSMS; //Override endpoint with local copy of wsdl. String URL ="";//here is the wsdl url Map<String,Object> requestContext = stub.getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, URL); //Set usernametoken URL fileURL = loader.getResource("client-config.xml"); File file = new File(fileURL.getFile()); FileInputStream clientConfig = null; try { clientConfig = new FileInputStream(file); } catch (FileNotFoundException e) { e.printStackTrace(); } XWSSecurityConfiguration config = null; try { config = SecurityConfigurationFactory.newXWSSecurityConfiguration(clientConfig); } catch (Exception e) { e.printStackTrace(); log.warn("Exception: "+e.getMessage()); } requestContext.put(XWSSecurityConfiguration.MESSAGE_SECURITY_CONFIGURATION, config); //Invoke the web service String requestId = null; try { requestId = sendSMS.sendSms(addresses, senderName, charging, message, receiptRequest); } catch (PolicyException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); } and the config file looks like this: <xwss:JAXRPCSecurity xmlns:xwss="http://java.sun.com/xml/ns/xwss/config" optimize="true"> <xwss:Service> <xwss:SecurityConfiguration dumpMessages="true" xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"> <xwss:UsernameToken name="username" password="password> </xwss:SecurityConfiguration> </xwss:Service> <xwss:SecurityEnvironmentHandler> util.SecurityEnvironmentHandler </xwss:SecurityEnvironmentHandler> </xwss:JAXRPCSecurity> The SecurityEnviromentHandler is a dummy class that implements javax.security.auth.callback.CallbackHandler. Authentication must be in compliance with Oasis Web Services Security Username Token Profile 1.0. But I'm constantly getting "Security header not valid" error. Where am I going wrong, can anyone tell me. I used wsimport(JAX_WS 2.1 to generate classes for my client) Note:Only thing I know about this WS is WSDL URL and user&pass for authentication

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >