i have read many articles that can be found on soap , i am trying to learn all that i can about it, but none of them make any sense to me. I know the basics of xml and i see alot of xpath being used in the xml examples that are shown on these articles. Do i need to know xpath in order to make sense out of soap?
The reason i want to make sense out of soap is because i have build a custom web app (ecommerce) and i need to display fedex rates during shipout and after looking through fedex the data exchange is through soap. I have tried looking for a php class but they are all outdated since fedex has updated their systems.
I do understand what soap is and how it is used but i cannot find one article that explains in plain english for beginners. If you know of any articles or somehow to help me that would be great.
I have tried looking for a php class but they are all outdated since fedex has updated their systems.
Have you checked FedEx's latest PHP SDK/library? It was upgraded to use the SOAP method long, long ago when they announced they were retiring the old, non-SOAP API. Using it will protect you from the utter insanity that is SOAP itself.
You don't need to know a single thing about XML if the SOAP implementation you use is sane. PHP's built-in SOAP handler is absolutely insane, but in a different way.
I would suggest taking a higher level approach to soap - as suggested by others here, it's for the most part something you don't want to mess around with the inner workings of.
The nusoap php library is used by many, and lets you consume and create web services quite easily.
Related
I'm developing an iPhone APP and need to implement also an Web Service.
First of all I'm not a Developer and never made something big in PHP, Objective-C, xCode.
My PHP knowledge isn't also good. But let's start with my Environment.
iPhone APP (xCode 4.2, iOS5), PHP Web Service, MySQL DB
I was researching the WEB and most People tend more to REST than SOAP. I think i see also the advantages of REST (using of simple HTTP Verbs (get, post, delete etc...), but that's not the main point here...
I think I understand the main goal of the REST Architecture and tried to make a little concept with an URI and Verb Mapping. Here just a simple example of the mapping:
/location/{location_id}/product
/location/{location_id}/product/{product_id}
Both are GET operations who should get me ether a single product or all products of a location.
How would a simple PHP REST Web Server look like with these functions?
Another part should implement a User Authentication from the iPhone. Somehow i need to store the user session, right now I don't have any idea how to make that. The goald is that if only a user is logged in, he could review the product.
Now I've researched also the Web but couldn't find an easy step-by-step Tutorial.
Do you know any good Tutorials which will help me achieve my goal? :)
A lot of people prefer using PHP Frameworks like ZEND. This seems very interesting, but it seems like a big package with a lot of modules.
Does someone know exactly which Modules are needed to get my Web Service working?
This is quite a good tutorial, it uses the codeigniter framework which makes the learning curve a bit steeper but makes it a lot more powerful in the long run.
http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/
If you want to build this the custom way it's actually very easy to do if you want to return information in the JSON format especially for php5 which is generally well supported amongst hosts these days.
Essentially the steps are like this:
Pass in product id via url and retrieve using GET i.e. service.php?product_id=10
Query database and return data for product id that was passed in
Store returned data in an array
Set header content-type to application/json
json_encode the result (json_encode)
That way when you call that url in a browser you will get a nice JSON formatted array result in a key:value pair manner. And as of iOS5 json parser comes with the framework (for earlier versions SBJson is a good framework to use (SB JSON))
I have a project to implement an EDI solution into an existing ecommerce-like website. There are only three EDI documents involved and only one company to transfer files with. They have strictly defined the X12 documents, and will be responsible for all of the GET/PUT's to an FTP site. The three documents are the Inventory Advice (inbound), Shipment Notification (inbound), and Invoice (outbound).
We do not want/need to implement a full-blown EDI management solution. My question is, am I crazy to think that this is a relatively simple parsing task using PHP? Does anyone know of any existing PHP libraries that might be useful (maybe X12 to XML)? My searches have come-up empty. I'd like to get started on my own right away if it is a realistic goal and no other resources are available.
The designer for the Oakland Data Transformer is free and this allows you to really understand the structure of the X12 document in the context of your sample document. You will need to contact Oakland Software support to get the required EDI definitions.
Depending on what you need, if you are just parsing the documents you should be able to do it pretty easily with PHP and understanding the context using the above product will take the mystery out of it for you.
Full disclosure: I run Oakland Software.
I was looking for something like that for .NET ... and nothing (at least not free, but really expensive). I don't think that you will find anything for php. I've ended up with simple code to do parsing (edi 850) and extract info that I needed. I think that it would be the best approach for you as well.
It's old, but I found it using google and maybe my answer will help someone...
I found in a comment on pear.php.net
http://code.google.com/p/izi-sandbox/source/browse/#svn%2Ftrunk%2Fphp%2Fphp_edi
I found searching for EDIFACT on github
https://github.com/markfoster/php_edifact
HI all,
I am designing an client - server application system. The Server provide 2 features: upload and download images. The clients (maybe Iphone, Android, WP7, ...) use these features to provide to end-users.
At this time, I can design the server as web-pages (such as upload.php, download.php) as well as webservices. Both ways work fine for me.
My question is: which one I use webservices or web-pages technical for my designing? And why?
Thanks.
To be honest with you, using something like SOAP for this seems like a lot of unnecessary effort. You can very easily accomplish this using form encoded data and the right query string parameters without going through the trouble of building SOAP envelopes and writing all of the XML. Granted, the system I described is very close to a REST webservice, so I suppose it depends on what you mean by "webservice." Either way though, given relatively simple system you've outlined, I don't think something like SOAP will give you a very good return on your investment.
If I have a REST based service written in the Symfony [symfony-project.org] framework (i.e. PHP), is there any decent tools/frameworks out there that will parse my code and generate API documentation?
The Java based framework enunciate has documentation capabilities similar to what I need, you can view an example of this here: http://enunciate.codehaus.org/wannabecool/step1/index.html.
I understand the premise of REST based services are supposed to be self evident, however I was after something that would generate this documentation for me without the need to manually write up all my endpoints, supported formats, sample output etc.
Thanks
Not sure if you've seen Swagger before. They seem to have a PHP compatible version, though I can't really vouch for it personally. It does some automatic API documentation generation comparable to enunciate, though it does look like it requires some heavy manual documentation via PHP comments. That being said, I think the manual effort will be the same or less than making your own via wiki pages, and the output is much, much nicer.
Just as a factoid, it looks like Enunciate has indefinite plans to eventually support other platforms, but the relevant Jira ticket is currently Open waiting for a sponsor to take on the work.
From the ENUNCIATE-356 Jira ticket:
The first step to supporting other languages is to decouple the Enunciate model from the Java model. This work is being tracked and logged at ENUNCIATE-584. Unfortunately, it never made it out of the investigate phase because of how heavy it is. Unless a sponsor for the work is found, I don't anticipate taking that heavy load on anytime soon.
Edit:
Found a similar question where someone mentions a GitHub project dedicated to Swagger+Symfony2. This other question is the same, but no additional information.
To my knowledge there is no way to automate the documentation of media types.
If you are using a media type like XHTML then a web crawler like Google sitemap may produce some useful output to show the relations between your resources.
I'm trying to write an interface between a home-grown project management system and Serena Mariner. (The bigwigs like to read Mariner, the worker bees like to write to the home grown system.)
How can I (programmatically?) figure out what Attribute Keys are available?
I'm actually writing the interface in PHP, but any advice would be much appreciated.
Mariner seems to have an API for working with the system. Otherwise, it might be better to ask at the Mariner Support Forum.
Update: I took a little bit more of a look at the API and it doesn't specify the attributes, which is what your question is about. I guess the support forum is the better bet then.