Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 External Development Forums - General External Development
Forum to discuss general external development topic (related or not to SalesLogix development). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General External Development | New ThreadView:  Search:  
 Author  Thread: Posting to SDATA from Java fails
Rick
Posts: 2
 
Posting to SDATA from Java failsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jan 09 6:26 AM
Hi all. I consume a webservice via a URI. I'm able to get the xml and change the element text. However, when I PUT the changed data to the server, the server response code is 200 but the data on the server never changed.

The server logs say:
Event Type: Information
Event Source: Services
Event Category: None
Event ID: 0
Date: 2009/01/23
Time: 14:05:14
User: N/A
Computer: xxx
Description:
2009-01-23 14:05:14,250 [10] DEBUG Sage.SalesLogix.Orm.EntityBase [(null)] - OnBeforeLoad, Type=AccountSummary, ID=A6UJ9A000036
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp

and

Event Type: Information
Event Source: Services
Event Category: None
Event ID: 0
Date: 2009/01/23
Time: 14:05:14
User: N/A
Computer: xxx
Description:
2009-01-23 14:05:14,250 [10] DEBUG Sage.SalesLogix.Orm.EntityBase [(null)] - OnBeforeLoad, Type=Account, ID=A6UJ9A000036
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp

and one for every element that I'm trying to post.

Does anyone have any idea what these error messages mean? How do I fix this. Your help will be appreciated.

[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Posting to SDATA from Java failsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jan 09 8:41 AM
So an exception is being thrown in the OnBeforeLoad of the web application. I would look at the rule and see what is it is trying to do. Maybe there is a piece of information required that is not supplied.

Good Luck on it.
[Reply][Quote]
Rick
Posts: 2
 
Re: Posting to SDATA from Java failsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jan 09 11:21 AM
Thank you for the reply, Mark. You are correct in your diagnosis that information was missing. I was having a hard time making up the correct SAX document to pass back to the slx server. I solved this by downloading the xml from a known working URI. I parsed that xml from the file to see if it posted. It did. Then I started stripping elements until I came down to the minimum xml needed to PUT to the server.

My procedure was: 1) Download the xml from the URI using jdom and a xerces parser (the default one with jdom). 2) Extract the root and child elements and add to an ArrayList 3)Manipulate the data 4) Compose a string from this data in the format deduced from experimenting with the file mentioned in the first paragraph. 5) Parse this string with jdom into a SAX document and PUT to the server. Voila.

Some observations: 1) omit the prologue (delete it) if you're parsing with jdom. Jdom adds its own prologue when parsing into a SAX/DOM document. 2) If you are PUTting elements to the server and you omit one, that field will be updated on the server with a null value.
[Reply][Quote]
rick h
Posts: 1
 
Re: Posting to SDATA from Java failsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Nov 09 6:25 PM
you may want to look at vtd-xml, the latest and most advanced xml processing api

vtd-xml
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 3:08:09 AM