Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-24-2003, 12:28 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,487
sde is on a distinguished road
sending an xml request

i'm trying to develop a php script which communicates with UPS via xml.

in the UPS documentation, they give examples of a 'request' and a 'response'

i know how to parse and read a response, but i'm wondering how i go about sending the request.

do i use curl? and if so, what paramter would i send the xml in? do i use a socket?

here is a copy of how they show the xml request should look:
PHP Code:
<?xml version="1.0"?>

<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
    <TransactionReference>
      <CustomerContext>Rating and Service</CustomerContext>
      <XpciVersion>1.0001</XpciVersion>
    </TransactionReference>
    <RequestAction>Rate</RequestAction>
    <RequestOption>shop</RequestOption>
  </Request>
  <PickupType>
  <Code>01</Code>
  </PickupType>
  <Shipment>
    <Shipper>
      <Address>
    <PostalCode>30076</PostalCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
    <PostalCode>30041</PostalCode>
      </Address>
    </ShipTo>
    <Service>
    <Code>11</Code>
    </Service>
    <Package>
      <PackagingType>
        <Code>02</Code>
        <Description>Package</Description>
      </PackagingType>
      <Description>Rate Shopping</Description>
      <PackageWeight>
        <Weight>33</Weight>
      </PackageWeight>
     </Package>
    <ShipmentServiceOptions/>
  </Shipment>
</RatingServiceSelectionRequest>
__________________
Mike
sde is offline   Reply With Quote
Old 09-24-2003, 08:02 PM   #2 (permalink)
jimmyoctane
Registered User
 
jimmyoctane's Avatar
 
Join Date: Sep 2003
Location: California
Posts: 26
jimmyoctane is on a distinguished road
Send a message via AIM to jimmyoctane
I know this guy

I know this guy at work who is trying this same sort of thing.
I will talk to him.
jimmyoctane is offline   Reply With Quote
Old 09-25-2003, 10:12 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,487
sde is on a distinguished road
i tried to get it working with c# last night too .. no go.

i have inquiries out to UPS developer support. ( who woulda thunk it )

they are requesting more information from me.. so now i'm waiting for their final verdict.

they say you can send http POST data, but they do not define a variable name to send the data as. the documentation also says you can create a socket and connect to the URL specified, however i think a socket needs to connect to a domain or ip .. not a sub directory of a web server.

it's confusing, but i'll get to the bottom of this.

hey jimmy, make sure you let me know about your co-worker's progress.

thanks
__________________
Mike
sde is offline   Reply With Quote
Old 09-25-2003, 12:38 PM   #4 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
just charge them $10 to ship anything!

woowoo!
__________________


Urban Clothing
Admin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Request Valmont Lounge 9 08-19-2004 09:43 PM
A request from Ali regarding Back OS processes redhead Platform/API C++ 0 08-11-2004 01:48 AM
sending a message from unix to windows sde Program Design and Methods 10 03-16-2004 02:46 PM
sending POST multiple post requests in one php script. sde PHP 2 08-09-2003 05:10 PM


All times are GMT -8. The time now is 11:54 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting