SOAP AddResource Error

Ideas and discussions on third party tools and utilities

Moderator: Forum Moderator

Post Reply
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

SOAP AddResource Error

Post by Mutt-Li »

I just found a bug in the Soap Add Resource Function

if the resource (name) exists on another Server (Deisi now exists on 2 planets Deisi [Sunrunner] Kammris Iron and Deisi [Flurry] Nabooian Berry Fruit) SoapAddResource causes an error and returns "status 4" and does not add the resource,
I added Deisi [Flurry] Nabooian Berry Fruit manually
here is the returned packet (with a few newlines added)

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:swgcraft">
<SOAP-ENV:Body>
<ns1:SoapAddResourceResponse xmlns:ns1="urn:swgcraft">
<return xsi:type="tns:AddResourceOutput">
<Status xsi:type="xsd:integer">4</Status>
<ResourceID xsi:type="xsd:integer">
</ResourceID>
</return>
</ns1:SoapAddResourceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: SOAP AddResource Error

Post by Mutt-Li »

Oh, just incase you want it ,
here is the sent packet, with extra newlines, and without my Hashed password

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS2="urn:swgcraft">
<NS1:SoapAddResource xmlns:NS1="urn:swgcraft">
<input href="#1"/>
</NS1:SoapAddResource>
<NS2:AddResourceInput id="1" xsi:type="NS2:AddResourceInput">
<Name xsi:type="xsd:string">Deisi</Name>
<Server xsi:type="xsd:int">9</Server>
<Planet xsi:type="xsd:int">6</Planet>
<Class xsi:type="xsd:string">Nabooina Berry Fruit</Class>
<Stats href="#2"/>
<Login href="#3"/>
<Current xsi:type="xsd:boolean">true</Current>
<ProgramInfo href="#4"/>
</NS2:AddResourceInput>
<NS2:Stats id="2" xsi:type="NS2:Stats">
<er xsi:type="xsd:int">0</er>
<cr xsi:type="xsd:int">0</cr>
<cd xsi:type="xsd:int">0</cd>
<dr xsi:type="xsd:int">0</dr>
<fl xsi:type="xsd:int">0</fl>
<hr xsi:type="xsd:int">0</hr>
<ma xsi:type="xsd:int">0</ma>
<oq xsi:type="xsd:int">0</oq>
<sr xsi:type="xsd:int">0</sr>
<ut xsi:type="xsd:int">0</ut>
<pe xsi:type="xsd:int">0</pe>
</NS2:Stats>
<NS2:Login id="3" xsi:type="NS2:Login">
<userid xsi:type="xsd:string">9259</userid>
<md5pass xsi:type="xsd:string">Im not telling you</md5pass>
</NS2:Login>
<NS2:ProgramInfo id="4" xsi:type="NS2:ProgramInfo">
<Name xsi:type="xsd:string">FZ_OCR_Res_Scanner</Name>
<Version xsi:type="xsd:string">1.0.1</Version>
</NS2:ProgramInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sobuno
Developer
Posts: 2591
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: SOAP AddResource Error

Post by Sobuno »

Status Codes:
1 = A resource named $name already exists. The stats have been updated if it had none.
2 = $class cannot spawn on $planet
3 = Resource added
4 = Class does not exist (Or isn't a spawnable class)
5 = Server does not exist
6 = Planet does not exist
7 = The resource name contains invalid characters
8 = A resource named $name already exists, but does not have the same class as the input resource
999 = Userid and password do not match
Your class is misspelled (Nabooina instead of Nabooian or whatever the correct is), working as intended.
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: SOAP AddResource Error

Post by Zimoon »

SWGCraft uses the class names spelled exactly as they are in the resourcetree.XML file that is available almost next to SWGAide, at its download site. SWGAide downloads it and uses it dynamically, I think it is available in the "crafting" folder.

Use that file and you will be fine.

There are very real and valid reasons for the few class names that does not read exactly as read in your inventory. More on that subject is read bottommost of the XML file :)

/Zimoon
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: SOAP AddResource Error

Post by Mutt-Li »

I just had a look at the saved screenshot,
the spelling on the screenshot is incorrect too
it seems someone at SOE screwed it up
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: SOAP AddResource Error

Post by Mutt-Li »

SWGCraft uses the class names spelled exactly as they are in the resourcetree.XML file that is available almost next to SWGAide, at its download site. SWGAide downloads it and uses it dynamically, I think it is available in the "crafting" folder.
My program, uses OCR to read the survey list, so how can i use it dynamically, other than using it as a spellchecker
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: SOAP AddResource Error

Post by Zimoon »

You can read the XML file into a hashmap, or a simple list, and each resource class from ORC must be verified/corrected against/with the map. In fact, you just need the leafs of the tree as no node wih children can ever spawn in the worlds.

/Zimoon
Mutt-Li
Novice Crafter
Posts: 45
Joined: Fri Oct 22, 2010 7:06 pm

Re: SOAP AddResource Error

Post by Mutt-Li »

I prefer the cvs files, easier to read,
I implemented a Conversion process to convert a 'Incorrect' Class to the 'Correct' one, (selected from a list) and record the correction for later use
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: SOAP AddResource Error

Post by Zimoon »

Mutt-Li wrote:I prefer the cvs files, easier to read,
I implemented a Conversion process to convert a 'Incorrect' Class to the 'Correct' one, (selected from a list) and record the correction for later use
Easier to read (for the human eye) I guess depends on formatting and layout. Reading a compact and not tabulated CVS is often a nightmare (and TABs are outside the protocol though often supported by readers). Reading a badly laid out XML is also a nightmare.

For computers CVS offers no natural way to tell hierarchies such as for resource classes, it can be done but kind of clumsy and not as elegant as XML.

That said, I belive the formatting and layout of the resourcetree.XML is quite nice and I often lookup what I need in my text editor (called MED and I brought it with me when I stopped using OS/2 many years ago, it's upside is HEX and binary display plus syntax coloring).

Yeah, extracting a small list of the oddities should work. And there are a few ;)

Zimoon
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests