• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

gastip
#1 Posted : Thursday, February 28, 2008 9:46:25 PM(UTC)
gastip

Rank: Member

Joined: 2/28/2008(UTC)
Posts: 36

What I'm trying to do is build a flash front end for the store. I need to get whatever the cart is outputting (for example, product data) in an XML format that can be parsed by flash action scripting.


My original plan was to make a slight mod to the pages to just output XML instead of the display html, but it appears there aren't template html files that can be modified. Rather it looks like dynamic pages are built, perhaps by the dlls in the source code.



Has anyone ever done this before? I'd just like to not reinvent the wheel if anyone knows of an easy way to get to xml output.



Thanks in advance for any help!!
Andy Miller
#2 Posted : Friday, February 29, 2008 3:08:27 AM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
The HTML front-end uses the API of BVSoftware.Bvc5.Core to retrieve product data, items in the cart, etc. The same API is exposed as a large web service (the URL is WebService3.asmx). You should be able to consume the web service in your Flash app and do whatever you like.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
gastip
#3 Posted : Friday, February 29, 2008 6:43:53 PM(UTC)
gastip

Rank: Member

Joined: 2/28/2008(UTC)
Posts: 36

Thanks for the help Andy! I'll give that a shot!
gastip
#4 Posted : Monday, March 3, 2008 5:12:54 PM(UTC)
gastip

Rank: Member

Joined: 2/28/2008(UTC)
Posts: 36

I was wondering if anyone also knows where to find the following parameters for the auth token required by the Catalog_Category_FindAll method of the webservices3.asmx:

&lt;ExpirationDate&gt;[color=#00008b>dateTime</FONT>&lt;/ExpirationDate&gt;
]dateTime[/color]&lt;/ExpirationDateUTC&gt;
&lt;UserBvin&gt;[color=#00008b>string</FONT>&lt;/UserBvin&gt;
]boolean[/color]&lt;/TokenRejected&gt;
&lt;IsExpired&gt;[color=#00008b>boolean</FONT>&lt;/IsExpired&gt;

I've]bvc_AuthenticationToken table but I'm not sure where the ExpirationDate and ExpirationDateUTC are or what format to pass them as.[/color]

[2]Thanks in advance for any help!

[/2]
Andy Miller
#5 Posted : Monday, March 3, 2008 5:25:23 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
IIRC, you use Membership_Login to get a token, then use that token in all of the other methods.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
gastip
#6 Posted : Monday, March 3, 2008 6:13:35 PM(UTC)
gastip

Rank: Member

Joined: 2/28/2008(UTC)
Posts: 36

Yeah Andy there's just a Login method. You are, once again, The Man. Thanks!
gastip
#7 Posted : Tuesday, March 4, 2008 9:06:39 PM(UTC)
gastip

Rank: Member

Joined: 2/28/2008(UTC)
Posts: 36

I'm getting a HTTP 500 error when I try and connect to the webservices passing in the token info. I'm using a get method to test and I've already modified the web.config to allow httpGet to work. It works fine for the Login method of the Webservices3 but I can get it to work for the [color=#6c2e19>Catalog_Category_FindAll]

Can anyone tell what I'm doing wrong?

Here's how I tested. I used the following url get method to return the xml for the Login method:

http://www.&lt;mysite&gt;.com/WebServices3.asmx/Login?username=admin&amp;password=password

which returns:

<SPAN class=b> [/color] [color=#0000ff><SPAN]&lt;?<SPAN class=pi>xml version="1.0" encoding="utf-8" <SPAN class=m>?&gt;[/color]


[color=#ff0000>-]&lt;[/color]<SPAN class=t>[color=#990000>AuthenticationToken<SPAN] xmlns:xsi[/color]<SPAN class=m>[color=#0000ff>="<B]http://www.w3.org/2001/XMLSchema-instance[/color]</B><SPAN class=m>[color=#0000ff>"<SPAN] xmlns:xsd[/color]<SPAN class=m>[color=#0000ff>="<B]http://www.w3.org/2001/XMLSchema[/color]</B><SPAN class=m>[color=#0000ff>"<SPAN] xmlns[/color]<SPAN class=m>[color=#0000ff>="<B]http://www.bvsoftware.com/Schemas/Bvc5/2006/01/WebServices3[/color]</B>[color=#0000ff><SPAN]"<SPAN class=m>&gt;[/color]



<SPAN class=b>[color=#ff0000> ]&lt;[/color]<SPAN class=t>[color=#990000>Bvin<SPAN]&gt;[/color]<SPAN class=tx>d88757c0-069c-4799-b3e2-4be249992fcf<SPAN class=m>[color=#0000ff>&lt;/<SPAN]Bvin[/color]<SPAN class=m>[color=#0000ff>&gt;]


<SPAN class=b> [/color] <SPAN class=m>[color=#0000ff>&lt;<SPAN]LastUpdated[/color]<SPAN class=m>[color=#0000ff>&gt;<SPAN]0001-01-01T00:00:00<SPAN class=m>&lt;/[/color]<SPAN class=t>[color=#990000>LastUpdated<SPAN]&gt;[/color]


<SPAN class=b>[color=#ff0000> ]&lt;[/color]<SPAN class=t>[color=#990000>ExpirationDate<SPAN]&gt;[/color]<SPAN class=tx>2008-03-04T18:56:13.389402-08:00<SPAN class=m>[color=#0000ff>&lt;/<SPAN]ExpirationDate[/color]<SPAN class=m>[color=#0000ff>&gt;]


<SPAN class=b> [/color] <SPAN class=m>[color=#0000ff>&lt;<SPAN]ExpirationDateUTC[/color]<SPAN class=m>[color=#0000ff>&gt;<SPAN]2008-03-05T02:56:13.389402Z<SPAN class=m>&lt;/[/color]<SPAN class=t>[color=#990000>ExpirationDateUTC<SPAN]&gt;[/color]


<SPAN class=b>[color=#ff0000> ]&lt;[/color]<SPAN class=t>[color=#990000>UserBvin<SPAN]&gt;[/color]<SPAN class=tx>30<SPAN class=m>[color=#0000ff>&lt;/<SPAN]UserBvin[/color]<SPAN class=m>[color=#0000ff>&gt;]


<SPAN class=b> [/color] <SPAN class=m>[color=#0000ff>&lt;<SPAN]TokenRejected[/color]<SPAN class=m>[color=#0000ff>&gt;<SPAN]false<SPAN class=m>&lt;/[/color]<SPAN class=t>[color=#990000>TokenRejected<SPAN]&gt;[/color]


<SPAN class=b>[color=#ff0000> ]&lt;[/color]<SPAN class=t>[color=#990000>IsExpired<SPAN]&gt;[/color]<SPAN class=tx>false<SPAN class=m>[color=#0000ff>&lt;/<SPAN]IsExpired[/color]<SPAN class=m>[color=#0000ff>&gt;]

<SPAN class=b> [/color] <SPAN class=m>[color=#0000ff>&lt;/<SPAN]AuthenticationToken[/color]<SPAN class=m>[color=#0000ff>&gt;

I]Catalog_Category_FindAll:[/color]

http://www.&lt;mysite&gt;.com/WebServices3.asmx/Catalog_Category_FindAll?ExpirationDate=2008-03-04T18:56:13.389402-08:00&amp;ExpirationDateUTC=2008-03-05T02:56:13.389402Z&amp;UserBvin=30&amp;TokenRejected=false&amp;IsExpired=false



Which give me the HTTP 500 internal server error.



I'm probably just doing something dumb, but can anyone point me in the right direction? Thanks!
Andy Miller
#8 Posted : Tuesday, March 4, 2008 11:09:57 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
Only methods that take primitive arguments (string, int, etc) are accessible via GET. For all the others you need to use POST. The post format is displayed by the built-in webservice documentor. For example, the Catalog_Category_FindAll method documentation would be here,

http://www.<mysite>.com/WebServices3.asmx?op-Catalog_Category_FindAll

To use POST: create your request, set the method to POST, add a SOAPAction header (i.e. SOAPAction: "http://www.bvsoftware.com/Schemas/Bvc5/2006/01/WebServices3/Catalog_Category_FindAll"), then send the message as the content of the message.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
gastip
#9 Posted : Thursday, March 6, 2008 11:59:01 PM(UTC)
gastip

Rank: Member

Joined: 2/28/2008(UTC)
Posts: 36

Would you (or anyone) happen to have an example of how to do this? I've been trying all day to get this to work and my eyes are starting to cross looking at it. My partner can't get it to work in actionscripting.


I wanted to do a test using ASP.NET and C#. I've been googling the how to pass parameters into a webservice but I can't get any of it to work.



Sorry to keep bugging you about this. :(
Andy Miller
#10 Posted : Friday, March 7, 2008 2:06:16 AM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
Using C# it is very easy. Let's say you have created a new console application in Visual Studio and added a Web Reference to WebServices3. This program will login, retrieve the list of categories and display them,

Code:

[color=#2b91af] Console[/color][2].WriteLine(category.Name);
}

}

}

}
[/2]

Note that BV declared many of the webservice parameters with the ref token.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
gastip
#11 Posted : Friday, March 7, 2008 11:31:26 PM(UTC)
gastip

Rank: Member

Joined: 2/28/2008(UTC)
Posts: 36

Thanks again Andy!

I can access the webservices with the code you sent. I'm then using XmlDocument to write out the xml tags to the browser in a separate page that my partner can hit and read with his actionscript. I know that's a total hack job, but that's what I can get to work for now.

I appreciate all the help!
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012