Try something like:
AddHandler wws .wws #associate the .wws extension with witango web
services
AddType text/xml .wws #map witango web service Content-Type header
AddCharSet ISO-8859-1 .wws #append this character set to the Content-
Type header
You need an AllowOverride On directive in your httpd.conf or the
virtualhost to enable .htaccess processing.
See httpd.apache.org/docs
On Mar 6, 2008, at 7:02 AM, Dale Graham wrote:
Yes, still trying to get .wws file to output with text/xml.
Will try the .htaccess route, but I am NOT hopeful, as I think
Apache is overriding text/xml for witango's text/html
I have no problem using headers for the REQUEST. That works. What
does NOT work is RESPONSE; header setting apparently doesn't apply
there.
And for AddHandler, what should I set?
Ditto, AddType?
AddType text/xml wws ????
AddHandler wws xml ???
On Mar 5, 2008, at 2:45 PM, William Conlon wrote:
I'm confused. Are you still trying to get your .wws file to output
with a text/xml content type header?
Can you create an .htaccess file that applies to the directory
containing a problematic file, and apply to AddType, AddHandler,
AddCharset directives and see what happens as you change them.
If you're using a taf, which is normally output as text/html, then
you need to override the header in witango, as Robert G showed in
his example.
bill
On Mar 5, 2008, at 2:16 PM, Dale Graham wrote:
Bummer. Those are my settings, too. I do think it's Apache, but
when I tinker with the mime types to deliver xml, it breaks either
webservices or (worse) witango.
I'll keep Googling around and if I come up with anything useful,
share it with the list.
Thanks, anyway, I really appreciated the input.
On Mar 5, 2008, at 1:46 PM, Robert Garcia wrote:
2 things, here are my settings from my witango.ini
ENCODEHTTPRESPONSE=false
ENCODERESULTHTML=false
ENCODERESULTSHTML=false
If that doesn't help, then apache is definitely overwriting the
content-type header. We used IIS and didn't have that issue.
Whether this is an issue of the apache plugin, or apache itself,
not sure. I can tell you how to make sure the header is right
with php and apache, but php and apache work together much more
closely. It seems to me that with witango, its more of just a
hand-off.
--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/
On Mar 5, 2008, at 10:25 AM, Dale Graham wrote:
I used your templates, got xml output of my data, etc. (Template/
explanations were GREAT) However, when called, it is STILL
outputting in text/html. Source looks great, I am thrilled, but
I cannot get it to my client... it HAS to come over as text/xml
for his application.
That's the bit I really need to fix. It's the OUTPUT that's
thwarting me.
Here's what httptester says about it..
HTTP/1.1 200 OK
Date: Wed, 05 Mar 2008 18:18:58 GMT
Server: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2
Set-Cookie: Witango_UserReference=B1B1522D002A6BAA47CEE412;
path=/
Connection: close
Content-Type: text/html
That is, I am calling it as the taf, e.g.,
http://localhost/webservices/wstemplate.taf?nedid=1113311619
As I presumed from your explanation that you weren't using a
wsdl file.
On Mar 5, 2008, at 10:36 AM, Robert Garcia wrote:
When 5.5 came out, we were excited about its built in ws
feature. That lasted about a week. I spent a month or so,
working out the best and most efficient method for webservices
in witango. I made a simple template, that we used to make
hundreds of webservices, all of them in production in heavy
load environments. This method is careful not to use looping to
generate xml. You can download the template, and a document
explaining my methodologies at:
http://www.bighead.net/tools/download.taf
Here is the meat of it:
<@assign local$outstyle '<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>'>
<@assign local$tempstyle '<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration ="yes"
indent="no"/>
<xsl:strip-space elements="*"/>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="event">
<xsl:for-each select="//event/Row">
<event>
<xsl:attribute name="rowid">
<xsl:value-of select="@id" />
</xsl:attribute>
<xsl:copy-of select="./*" />
</event>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>'>
<@comment>
The tempstyle above, and the local array to convert to dom
needs to be changed to match the name you want for Node name
for your data.
</@comment>
<@assign local$labServiceInclusions <@var local$resultSet>>
<@arraytodom array=local$labServiceInclusions>
<@assign local$thexml <@dom '<EPXSWServiceResponse />'>>
<@dominsert local$thexml xpath="/EPXSWServiceResponse"
position=append><success>1</success></@dominsert>
<@dominsert local$thexml xpath="/EPXSWServiceResponse"
position=append><reason><@literal "Authorization Successful."
encoding=cdata></reason></@dominsert>
<@dominsert local$thexml xpath="/EPXSWServiceResponse"
position=append><status>1</status></@dominsert>
<@dominsert local$thexml xpath="/EPXSWServiceResponse"
position=append><rowCount><@numrows array=local$resultSet></
rowCount></@dominsert>
<@dominsert local$thexml xpath="/
EPXSWServiceResponse"><@replace str='<@xslt local
$labServiceInclusions stylesheet="<@var local$tempstyle>">'
findstr='<\?.+\?>' replacestr='' type=regex></@dominsert>
<@! output of xslt is string, so it applies xslt and outputs as
text >
<@assign local$result '<@xslt local$thexml stylesheet="<@var
local$outstyle>">'>
<@assign local$cLen <@length "<@var local$result>">>
<@assign local$httpResponse "false">
Then the next acction is the header, but notice the response
variable above, this must be set to false.
<@purgeresults><@assign local$httpHeader "HTTP/1.1 200
OK<@crlf>Server: WiTango 5.5.009<@crlf>MIME-Version:
1.0<@crlf>Content-Type: text/xml;charset=utf-8<@crlf>Content-
length: <@var local$cLen><@crlf>X-Timer: <@timer><@CRLF><@CRLF>">
Then finally, return the data:
<@var local$result encoding=none>
We have a few old clients still running like this, but all the
heavy hitting ws's are now in php. But I can tell you the above
worked, and worked well, AS LONG AS you had no high byte
characters in your xml data.
NOTE: the template you download from my site, uses UTF-8
declaration, but should be the above, ISO-8859-1. No matter
what, you can't get witango 5.5 to properly output UTF-8.
--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/
On Mar 5, 2008, at 3:20 AM, Dale Graham wrote:
I have been using various tools (SOAPclient and HTTPtester)
and here's what I am getting
Request is OK, as follows
User-Agent: Mac OS X; WebServicesCore.framework (1.0.0)
Content-Type: text/xml
Soapaction: http://localhost/nees.wws
Host: localhost
But **response** is in error, sending back Content-Type: text/
html instead of text/xml
HTTP/1.1 200 OK
Connection: close
Server: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2
Content-Type: text/html
Date: Wed, 05 Mar 2008 11:15:54 GMT
Set-Cookie: Witango_UserReference=F4E923AA5841685247CE80EA;
path=/
Transfer-Encoding: Identity
What I can't figure out is how to set up Witango (and/or
Apache 2.2.6) to send back the RESPONSE to a .wws call as XML
The WSDL file starts out with
<?xml version="1.0" encoding="UTF-8" ?>
so I presumed that would be enough
I tried to add content-type headers for the tcfs providing the
data, but that corrupted the process
I experimented with the mime.types but only succeeded in
killing all webservices
Any ideas or solutions?
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
--------------
Dale Graham,PhD
Technical Manager, NIDB
Custom Applications Branch, DECA, NIH
[EMAIL PROTECTED]
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/
maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
--------------
Dale Graham,PhD
Technical Manager, NIDB
Custom Applications Branch, DECA, NIH
[EMAIL PROTECTED]
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
--------------
Dale Graham,PhD
Technical Manager, NIDB
Custom Applications Branch, DECA, NIH
[EMAIL PROTECTED]
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf